wrap: wrap (pack) a SpatRaster or SpatVector object

Description Usage Arguments Value Examples

Description

Wrap a SpatRaster or SpatVector object to create a Packed* object that it can be saved as an R object to disk, or passed over a connection that serializes (e.g. using a computer cluster).

Usage

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

## S4 method for signature 'SpatVector'
wrap(x)

Arguments

x

SpatVector or SpatRaster

Value

Packed* object

Examples

1
2
3
4
5
6
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
p <- wrap(v)
p
vv <- vect(p)
vv

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