R: xyLayer

xyLayer {rasterVis} | R Documentation

## 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ñá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)

[Package rasterVis version 0.44 Index]