[go: up one dir, main page]

File: ST-class.Rd

package info (click to toggle)
r-cran-spacetime 1.3-3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,240 kB
  • sloc: sh: 13; makefile: 2
file content (80 lines) | stat: -rw-r--r-- 2,792 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
\name{ST-class}
\docType{class}
\alias{ST-class}
\alias{xts-class}
\alias{zoo-class}
\alias{ST}
\alias{dim.ST}
\alias{[[<-,ST,ANY,missing-method}
\alias{[[,ST,ANY,missing-method}
\alias{$<-,ST-method}
\alias{$,ST-method}
\alias{cbind.ST}
\alias{is.projected,ST-method}
\alias{proj4string,ST-method}
\alias{proj4string<-,ST,CRS-method}
\alias{proj4string<-,ST,character-method}
\alias{geometry,ST-method}

\title{Class "ST"}
\description{ An abstract class from which useful spatio-temporal classes are
derived }
\section{Objects from the Class}{
Objects of this class are not meant to be useful; only derived
classes can be meaningful }
\section{Slots}{
  \describe{
    \item{\code{sp}:}{Object deriving from class \code{"Spatial"}}
    \item{\code{time}:}{Object of class \code{"xts"}}
  }
}
\section{Methods}{
  \describe{
    \item{[[}{\code{signature(obj = "ST")}: retrieves the attribute element }
    \item{$}{\code{signature(obj = "ST")}: retrieves the attribute element }
    \item{[[<-}{\code{signature(obj = "ST")}: sets or replaces the attribute element }
    \item{$<-}{\code{signature(obj = "ST")}: sets or replaces the attribute element }
    % \item{plot}{\code{signature(x = "Spatial", y = "missing")}: plot method
	% for spatial objects; does nothing but setting up a plotting region choosing
	% a suitable aspect if not given(see below), colouring the plot background using either a bg= argument or par("bg"), and possibly drawing axes.  }
	% \item{summary}{\code{signature(object = "Spatial")}: summarize object}
  }
}

\usage{
ST(sp, time, endTime)
}

\arguments{
\item{sp}{an object deriving from class \link[sp]{Spatial}, such as
a \link[sp]{SpatialPoints} or \link[sp]{SpatialPolygons}}
\item{time}{an object of class xts, or a time vector
(currently: Date, POSIXct, timeDate, yearmon and yearqtr; are supported;
see \link[xts]{xts}); in the latter case, it should be in time order }
\item{endTime}{ vector of class \code{POSIXct} holding end points of
time intervals }
}
\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 \code{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{ Edzer Pebesma, \email{edzer.pebesma@uni-muenster.de} }
\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))
}

\keyword{classes}