collapse: tighten SpatRaster or SpatRasterDataset objects

Description Usage Arguments Value Examples

Description

Combines data sources within a SpatRaster object (that are in memory, or from the same file) to allow for faster processing.

Or combine sub-datsets into a SpatRaster.

Usage

1
2
3
4
5
## S4 method for signature 'SpatRaster'
tighten(x)

## S4 method for signature 'SpatRasterDataset'
tighten(x)

Arguments

x

SpatRaster or SpatRasterDataset

Value

SpatRaster

Examples

1
2
3
4
r <- rast(nrow=5, ncol=9, vals=1:45)
x <- c(r, r*2, r*3)
x
tighten(x)

terra documentation built on Oct. 11, 2021, 9:09 a.m.