Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ST-class

Class "ST"


Description

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

Usage

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)

References

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

Examples

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

Classes and Methods for Spatio-Temporal Data

v1.2-4
GPL (>= 2)
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Benedikt Graeler [ctb], Tom Gottfried [ctb], Robert J. Hijmans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.