replace_dollar {terra} | R Documentation |
Replace with $<-
Description
Replace a layer of a SpatRaster, or an attribute variable of a SpatVector
Usage
## 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
Arguments
x |
SpatRaster, SpatVector or SpatExtent |
name |
character. If |
value |
if |
Value
Same as x
See Also
Examples
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
v$ID_1 <- LETTERS[1:12]
v$new <- sample(12)
values(v)
[Package terra version 1.7-78 Index]