Learn R Programming

terra (version 1.1-17)

pack: pack a SpatRaster or SpatVector object

Description

Pack a SpatRaster or SpatVector object so 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

# S4 method for SpatRaster
pack(x)

# S4 method for SpatVector pack(x)

Arguments

x

SpatVector or SpatRaster

Value

Packed* object

Examples

Run this code
# NOT RUN {
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
p <- pack(v)
p
vv <- vect(p)
vv
# }

Run the code above in your browser using DataLab