Last data update: 2014.03.03
|
R: xyLayer
xyLayer
Description
Create a RasterLayer from a function of the coordinates.
Usage
xyLayer(object, dirXY = y)
Arguments
object |
A Raster object.
|
dirXY |
A expression indicating the function of x and
y (coordinates of the Raster object) to be evaluated.
|
Value
A RasterLayer object.
Author(s)
Oscar Perpi<c3><83><c2><b1><c3><83><c2><a1>n Lamigueiro.
See Also
init , substitute , eval
Examples
f <- system.file("external/test.grd", package="raster")
r <- raster(f)
dirX <- xyLayer(r, x)
dirXY <-xyLayer(r, sqrt(x^2 + y^2))
levelplot(dirXY, margin=FALSE)
Results
|