trip-class {trip}R Documentation

Class "trip" ~~~

Description

An extension of "SpatialPointsDataFrame" by including "TimeOrderedRecords". The records within the data frame are explicitly ordered by DateTime data within IDs.

Objects from the Class

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

Slots

TOR.columns:
Object of class "character" specifiying the DateTime and ID columns (in that order) in data
data:
Object of class "data.frame" the native data object for a Spatial data frame

Also, other slots usual to a SpatialPointsDataFrame

Extends

Class "TimeOrderedRecords", directly. Class "SpatialPointsDataFrame", directly. Class "SpatialPoints", by class "SpatialPointsDataFrame". Class "Spatial", by class "SpatialPointsDataFrame".

Methods

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.

trip
signature("ANY"): try to return a trip object
trip
signature(obj = "SpatialPointsDataFrame", TORnames = "ANY"
{The usual construction}

[
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.
lines
signature(x = "trip"): add lines to a plot with separate colours for each trip
plot
signature(x = "trip", y = "missing"): plot as SpatialPoints
points
signature(x = "trip"): add points to a plot using the Spatial coordinates
recenter
signature(obj = "trip"): perform coordinate recentering, from the [-180,180] convention to [0, 360
show
signature(object = "trip"): print a short summary of the trip data
summary
signature(object = "trip"): print a summary as per SpatialPointsDataFrame including a summary of the trip data
text
signature(x = "trip"): add text to a plot using Spatial coordinates
trip
signature(obj = "trip", TORnames = "TimeOrderedRecords"): (re)-create a trip object using TimeOrderedRecords
trip
signature(obj = "trip", TORnames = "ANY"): (re)-create a trip object by some other means
subset
signature(x = "trip", ...): subset a trip in the expected manner.

Warning

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.

Note

~~further notes~~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

trip for examples of directly using the class.

Examples

##---- Should be DIRECTLY executable !! ----

[Package trip version 1.1-2 Index]