if (requireNamespace("terra", quietly = TRUE)) {
file <- system.file("ex/lux.shp", package = "terra")
v <- terra::vect(file)
## Marshal SpatVector object
v_ <- marshal(v)
## Unmarshal SpatVector object
v2 <- unmarshal(v_)
stopifnot(all.equal(v2, v, check.attributes = FALSE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.