| trip-class {trip} | R Documentation |
An extension of "SpatialPointsDataFrame" by including "TimeOrderedRecords".
The records within the data frame are explicitly ordered by DateTime data within IDs.
Objects can be created by calls of the form
trip(obj = "SpatialPointsDataFrame", TORnames = "TimeOrderedRecords".
The object contains all the slots present within a SpatialPointsDataFrame, particularly data
which contains columns of at least those specified by TOR.columns
TOR.columns:"character" specifiying the DateTime and ID columns (in that order)
in data data:"data.frame" the native data object for a Spatial data frame
Also, other slots usual to a SpatialPointsDataFrame
Class "TimeOrderedRecords", directly.
Class "SpatialPointsDataFrame", directly.
Class "SpatialPoints", by class "SpatialPointsDataFrame".
Class "Spatial", by class "SpatialPointsDataFrame".
Most of the methods available are by virtue of the sp package.
Some, such as split.data.frame have been added to SPDF so that trip has the
same functionality.
signature("ANY"): try to return a trip objectsignature(obj = "SpatialPointsDataFrame", TORnames = "ANY"signature(x = "trip"): subset rows or columns as per
SpatialPointsDataFrame.
In the case that TimeOrderedRecords columns are dropped, the object
reverts to the straight Spatial version. signature(x = "trip"): add lines to a plot with separate
colours for each tripsignature(x = "trip", y = "missing"): plot as
SpatialPoints signature(x = "trip"): add points to a plot using the
Spatial coordinates signature(obj = "trip"): perform coordinate recentering,
from the [-180,180] convention to [0, 360 signature(object = "trip"): print a short summary of the trip datasignature(object = "trip"): print a summary as per
SpatialPointsDataFrame including a summary of the trip datasignature(x = "trip"): add text to a plot using Spatial coordinatessignature(obj = "trip", TORnames = "TimeOrderedRecords"): (re)-create a trip object using TimeOrderedRecordssignature(obj = "trip", TORnames = "ANY"): (re)-create a trip object by some other means signature(x = "trip", ...): subset a trip in the expected manner.
There are some kludges to allow trip to do things, such as replace POSIXt
column data using "$<-.trip" and "[[<-.trip" which should not be
necessary once sp implements the new data.frame class of R >=2.4.0.
~~further notes~~
~~who you are~~
~put references to the literature/web site here ~
trip for examples of directly using the class.
##---- Should be DIRECTLY executable !! ----