Learn R Programming

trip (version 1.1-6)

trip: Function to handle animal track data, organized as "trip"s

Description

Extend the basic functionality of a Spatial data frame by specifying the data columns that define the "TimeOrdered" quality of the records.

Usage

trip(obj, TORnames)

Arguments

obj
A SpatialPointsDataFrame, containing at least two columns with the DateTime and ID data as per TORnames
TORnames
Either an object of TimeOrderedRecords, or a 2-element character vector specifying the DateTime and ID column of obj

Value

  • A trip object, with the usual slots of a SpatialPointsDataFrame and the added TimeOrderedRecords. For the most part this can be treated as a data.frame with Spatial coordinates.

See Also

speedfilter, and tripGrid for simple(istic) speed filtering and spatial time spent gridding.

Examples

Run this code
d <- data.frame(x = 1:10, y = rnorm(10), tms = Sys.time() + 1:10, id = gl(2, 5))
coordinates(d) <- ~x+y
tr <- trip(d, c("tms", "id"))

Run the code above in your browser using DataLab