spatialAtRisk.RasterLayer: Convert rasters to lgcp objects

Description Usage Arguments Value Examples

View source: R/lgcpRaster.R

Description

Convert a RasterLayer to spatialAtRisk

Usage

1

Arguments

X

an object of class RasterLayer-class

...

not used

Value

A fromXYZ object produced by spatialAtRisk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)

PmiscSpatial documentation built on Nov. 8, 2019, 3 p.m.