Learn R Programming

terra (version 0.9-8)

c: Combine SpatRasters

Description

Combine SpatRasters into a new SpatRaster object with c or add to an existing object with add. collapse combines sources within an object (that are in memory, or from the same file) to allow for faster processing.

Usage

# S4 method for SpatRaster
c(x, ...)

# S4 method for SpatRaster,SpatRaster add(x)<-value

# S4 method for SpatRaster collapse(x, ...)

# S4 method for SpatDataSet c(x, ...)

# S4 method for SpatDataSet collapse(x, ...)

Arguments

x

SpatRaster or SpatDataSet

...

For c: SpatRaster objects to be combined with x. Not implemented for collapse)

value

SpatRaster

Value

SpatRaster

Examples

Run this code
# NOT RUN {
r <- rast(nrow=5, ncol=9)
values(r) <- 1:ncell(r)
x <- c(r, r*2, r*3)
# }

Run the code above in your browser using DataLab