replace_dollar | R Documentation |
Replace a layer of a SpatRaster, or an attribute variable of a SpatVector
## S4 replacement method for signature 'SpatRaster'
x$name <- value
## S4 replacement method for signature 'SpatVector'
x$name<-value
## S4 replacement method for signature 'SpatExtent'
x$name <- value
x |
SpatRaster, SpatVector or SpatExtent |
name |
character. If |
value |
if |
Same as x
[[<-, [<-, $
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
v$ID_1 <- LETTERS[1:12]
v$new <- sample(12)
values(v)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.