ST-class: Class "ST"

Description Usage Arguments Objects from the Class Slots Methods Note Author(s) References Examples

Description

An abstract class from which useful spatio-temporal classes are derived

Usage

1
ST(sp, time, endTime)

Arguments

sp

an object deriving from class Spatial, such as a SpatialPoints or SpatialPolygons

time

an object of class xts, or a time vector (currently: Date, POSIXct, timeDate, yearmon and yearqtr; are supported; see xts); in the latter case, it should be in time order

endTime

vector of class POSIXct holding end points of time intervals

Objects from the Class

Objects of this class are not meant to be useful; only derived classes can be meaningful

Slots

sp:

Object deriving from class "Spatial"

time:

Object of class "xts"

Methods

[[

signature(obj = "ST"): retrieves the attribute element

$

signature(obj = "ST"): retrieves the attribute element

[[<-

signature(obj = "ST"): sets or replaces the attribute element

$<-

signature(obj = "ST"): sets or replaces the attribute element

Note

argument (and object slot) sp can be pure geometry, or geometry with attributes. In the latter case, the geometries are kept with the sp slot, and only replicated (when needed) on coercion to the long format, with as.data.frame.

Slot time needs to be of class xts; if a time or date vector is passed as argument to SP, it will be converted into an xts object.

When endTime is missing, an error is thrown.

ST is meant as a super-class, and is not to be used for representing data, similar to Spatial in the sp package.

Author(s)

Edzer Pebesma, [email protected]

References

http://www.jstatsoft.org/v51/i07/

Examples

1
2
3
4
time = as.Date('2008-01-01')+1:2
library(sp)
sp = SpatialPoints(cbind(c(0,1),c(0,1)))
ST(sp, time, delta(time))

spacetime documentation built on July 18, 2018, 9:04 a.m.