Learn R Programming

amt (version 0.1.4)

remove_capture: Removes Capture Effects

Description

Removing relocations at the beginning and/or end of a track, that fall within a user specified period.

Usage

remove_capture_effect(x, ...)

# S3 method for track_xyt remove_capture_effect(x, start, end, ...)

Arguments

x

An object of class track_xyt.

...

Further arguments, none implemented.

start

A lubirdate::Period, indicating the time period to be removed at the beginning of the track.

end

A lubirdate::Period, indicating the time period to be removed at the end of the track.

Examples

Run this code
# NOT RUN {
library(lubridate)
n <- 10
df <- track(
  x = cumsum(rnorm(n)),
  y = cumsum(rnorm(n)),
  t = ymd_hm("2017-01-01 00:00") +
   hours(seq(0, by = 24, length.out = n))
)

df
remove_capture_effect(df, start = days(1))
remove_capture_effect(df, end = days(2))
remove_capture_effect(df, start = days(1), end = days(2))

# }

Run the code above in your browser using DataLab