Learn R Programming

chronosphere (version 0.4.1)

as.RasterArray: Convert Raster* objects to RasterArrays

Description

The function converts RasterLayer, RasterStack and RasterBrick objects to RasterArray class objects.

Usage

as.RasterArray(from)

# S4 method for RasterLayer as.RasterArray(from)

# S4 method for RasterStack as.RasterArray(from)

# S4 method for RasterBrick as.RasterArray(from)

# S4 method for SpatialPoints as.SpatialArray(from)

# S4 method for SpatialPointsDataFrame as.SpatialArray(from)

# S4 method for SpatialLines as.SpatialArray(from)

# S4 method for SpatialLinesDataFrame as.SpatialArray(from)

# S4 method for SpatialPolygons as.SpatialArray(from)

# S4 method for SpatialPolygonsDataFrame as.SpatialArray(from)

Value

A RasterArray class object.

Arguments

from

Object to be converted.

Examples

Run this code
data(dems)
recent <- dems[1]
# convert RasterLayer to RasterArray
ra <- as.RasterArray(recent)

Run the code above in your browser using DataLab