| transmute.Spat | R Documentation |
Spat* objectstransmute() creates a new object containing only the specified
computations. It's superseded because you can perform the same job
with mutate(.keep = "none").
## S3 method for class 'SpatRaster'
transmute(.data, ...)
## S3 method for class 'SpatVector'
transmute(.data, ...)
.data |
A |
... |
< The value can be:
|
A Spat* object of the same class than .data. See Methods.
Implementation of the generic dplyr::transmute() method.
mutate.Spat, dplyr::transmute() methods.
library(terra)
# SpatVector method
f <- system.file("extdata/cyl.gpkg", package = "tidyterra")
v <- vect(f)
v |>
transmute(cpro2 = paste0(cpro, "-CyL"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.