This function attempts to automatically detect and correct missing data (for instance due to writing errors) in trajectory tables.

fixMissing(x, begin = NULL, end = NULL, step = NULL,
  spline = FALSE)

Arguments

x

A trajectory data table as produced by the makeTraj function.

begin

A full timestamp (date+time) in POSIXct format corresponding to the beginning of the trajectory. If not set, it is set to the first timestamp of the trajectory table.

end

A full timestamp (date+time) in POSIXct format corresponding to the end of the trajectory. If not set, it is set to the last timestamp of the trajectory table.

step

A difftime object representing the time between two consecutive locations of the trajectory. If not set, it is set to the most common time difference between successive locations in traj.

spline

If spline is TRUE, inconsistent locations are estimated using spline interpolation. If FALSE (the default), a linear interpolation is used instead.

Value

A trajectory data table as produced by the makeTraj function. If not present, an "error" column will be added that indicates which observations were corrected.

See also

Examples

# TODO