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
|
\name{z-values}
\alias{getZ}
\alias{setZ}
\title{Get or set z-values}
\description{
Initial functions for a somewhat more formal approach to get or set z values (e.g. time) associated with layers of Raster* objects. In development.
}
\usage{
setZ(x, z, name='time')
getZ(x)
}
\arguments{
\item{x}{Raster* object}
\item{z}{vector of z values of any type (e.g. of class 'Date')}
\item{name}{character label}
}
\value{
setZ: Raster* object
getZ: vector
}
\examples{
r <- raster(ncol=10, nrow=10)
s <- stack(lapply(1:3, function(x) setValues(r, runif(ncell(r)))))
s <- setZ(s, as.Date('2000-1-1') + 0:2)
s
getZ(s)
}
\keyword{spatial}
|