zvalues: Get or set z-values

Description Usage Arguments Value Examples

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

1
2
setZ(x, z, name='time')
getZ(x)

Arguments

x

Raster* object

z

vector of z values of any type (e.g. of class 'Date')

name

character label

Value

setZ: Raster* object

getZ: vector

Examples

1
2
3
4
5
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)

raster documentation built on May 19, 2017, 1:13 p.m.

Search within the raster package
Search all R packages, documentation and source code