spatialAtRisk.RasterLayer {Pmisc}R Documentation

Convert rasters to lgcp objects

Description

Convert a RasterLayer to spatialAtRisk

Usage

spatialAtRisk.RasterLayer(X, ...)

Arguments

X

an object of class RasterLayer-class

...

not used

Value

A fromXYZ object produced by spatialAtRisk

Examples

library('raster')
x = raster(matrix(1:12, 4,3,byrow=TRUE))/100
sum(values(x))*prod(res(x))
par(mfrow=c(1,2))
plot(x)
## Not run: 
library('lgcp')
x2 = spatialAtRisk(x)
sum(x2$Zm)*prod(res(x))
plot(x2)

## End(Not run)

[Package Pmisc version 0.2.6 Index]