Learn R Programming

chronosphere (version 0.4.1)

cbind.RasterArray: Combine Raster and Vector Spatial data to RasterArray or SpatialArray objects by rows or columns

Description

The function takes a sequence of RasterLayer or RasterArray class objects and combines them to two dimensional RasterArrays, Alternatively, the function can be used to combine vector Spatial* data to SpatialArrays. Named objects will be forced together based on names, colnames or rownames attributes, via insertion of NAs.

Usage

# S3 method for RasterArray
cbind(...)

# S3 method for RasterArray rbind(...)

# S3 method for SpatialArray cbind(...)

# S3 method for SpatialArray rbind(...)

Value

A RasterArray or SpatialArray class object.

Arguments

...

RasterLayer or RasterArray class objects to be combined.

Examples

Run this code
data(dems)
# create matrices out of vectors
colb <- cbind(dems, dems)
rowb <- rbind(dems, dems)
# automatic name matching
dems2 <- dems[c(1:4, 6:10)]
matched <- suppressWarnings(cbind(dems, dems2))

Run the code above in your browser using DataLab