fillGapTracksNight: Imputes gaps in a 'Tracks' object.

Description Usage Arguments Details Value See Also Examples

View source: R/fillGapTracksNight.R

Description

fillGapTracksNight imputes missing values in all Track objects of the Tracks objects of a TracksCollection. Gaps are filled if their duration is a user specified duration threshold and if the distance between the spatial position of the last data value before the gap and the spatial position of the first data value after the gap is a user specified distance threshold.

Usage

1
2
3
4
5
6
7
8
fillGapTracksNight(
  currenttracks,
  maxduration,
  maxdistance,
  night = c(16, 20),
  cores = 1,
  clcall = NULL
)

Arguments

currenttracks

A TracksCollection object with Tracks objects with each haveing only one Track object with a boolean column gap in track@data. Data values have to be regularly spaced (may be achieved for example with reorganizeTracks).

maxduration

A numerical value representing the maximum allowed duration of a gap that is filled [s].

maxdistance

A numerical value representing the maximum allowed distance between the spatial position of the last data value before a gap and the spatial position of the first data value after a gap that is filled [m].

night

An integer vector with two elements:

  1. The first element specifies the start hour of the night, e.g. 0 for 0 o'clock.

  2. The first element specifies the start hour of the night, e.g. 4 for 4 o'clock.

cores

An integer value representing the number of cores to use in parallel computing.

clcall

A function that is passed to clusterCall.

Details

It has to be paid attention to the fact that maxduration should be adapted to the time interval specified by night. For example, if one specifies the time interval between 0 and 4 o' clock as night and wants to allow a maxduration of four days (assuming that there may be gaps for four following nights, but if there is no gap in the fifth night, then the gap is filled), then one must specifiy maxduration as 4*24*60*60 + (24 - nightduration)*60*60, whereby nightduration is the duration of the time interval specified as night in hours.

Value

The input Tracks object with filled gaps.

See Also

fillGapTrackNight.

Examples

1
#

henningte/herdersTA documentation built on Jan. 22, 2020, 5:16 a.m.