lxy.thin.byfreq: Delete locations to harmonize the sampling frequency and time...

Description Usage Arguments Value Note See Also

Description

Standardize the sampling frequency and duration across individuals in a LoCoH-xy object by deleting points

Usage

1
2
3
4
lxy.thin.byfreq(lxy, id = NULL, trim.ends = FALSE, dt.start = NULL,
  dt.end = NULL, byfreq = FALSE, samp.freq = "lcm",
  lcm.round = 120, lcm.max.iter = 300, status = TRUE,
  dt.int.round.to = 0.1, tau.diff.max = 0.02)

Arguments

lxy

A LoCoH-xy object

id

The id value(s) to be harmonized

trim.ends

Truncate points from either end of the timeline to achieve a common time window, T/F

dt.start

The starting date-time that all individual trajectories will be truncated to. Should be a POSIXct or POSIXlt object. If NULL, the first date-time that all points have in common will be used.

dt.end

The end date-time that all individual trajectories will be truncated to. If NULL, the last date-time that all points have in common will be used.

byfreq

Delete points to achieve a common sampling frequency (samp.freq), T/F

samp.freq

The common time step for the output (in seconds). Can also be set to "lcm", in which case the least common multiple of the median time step of each individual will be computed

lcm.round

When samp.freq="lcm", the median time step for each individual will be rounded to the nearest interval of lcm.round (in seconds)

lcm.max.iter

The maximum number of iterations to be used in the algorithm that finds the least common multiple of the median time steps

status

Show messages, T/F

dt.int.round.to

The proportion of the median sampling frequency that time intervals will be rounded to when computing the frequency table of sampling intervals (no change is made to the time stamps)

tau.diff.max

The maximum deviation from tau (the median delta.t of the entire dataset), expressed as a proportion of tau, that time difference between two points must fall for the distance between those two points to be included in the calculation of the median step length

Value

a LoCoH-xy object

Note

This function processes a LoCoH-xy object that contains movement data (for one for several individuals), and removes points such that the output contains a fixed start and end date for each individual, as well as an approximately uniform sampling frequency (time step).

Before using this function, you should clean your data of all abnormally short time intervals (e.g., bursts). See lxy.thin.bursts.

If you know the time interval the data was *supposed* to be sampled (e.g., every 20 minutes), you should pass that value for samp.freq (expressed in seconds). If samp.freq="lcm", the function will automatically compute the common time step for the individuals by taking the least common multiple of the median time steps of each individual. You can deal with noise by rounding the median sampling interval to the value of lcm.round (expressed in seconds).

The function lxy.plot.freq can help you see the 'actual' sampling intervals in the data (set by.date=TRUE).

Because this function deletes points, the nearest-neighbors lookup table of the LoCoH-xy object (if any) will be deleted.

See Also

xyt.lxy, lxy.plot.freq, lxy.thin.bursts


tlocoh documentation built on May 2, 2019, 5:27 p.m.