fillGapTrackNight: Imputes gaps in a 'Track' object.

Description Usage Arguments Details Value See Also Examples

View source: R/fillGapTrackNight.R

Description

fillGapTrackNight imputes missing values in a Track object. 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
fillGapTrackNight(currenttrack, maxduration, maxdistance, night = c(16, 20))

Arguments

currenttrack

A Track object with a boolean column gap in currenttrack@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]. It has to be paid attention to the fact that maxduration should be adapted to the time interval specified by night. See the details section.

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.

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 Track object with the variable gap set to FALSE for filled gap values. Additionally, the output has a new variable filled indicating if a gap was filled (filled = TRUE) or not (filled = FALSE)

See Also

fillGapTracksNight.

Examples

1
#

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