[<-,VirtualArray,ANY,ANY,logical-method | R Documentation |
VirtualArray
'.Single bracket '['
refers to indices and names within the 'VirtualArray
'-class object. Use double brackets to replace layers based on their names (in the @stack
).
Object types of the same kind class can be used to replace values in 'XArray
'-class objects. 'SpatRaster
'-class objects can be used to replace values in 'RasterArray
'-class objects. Classes inheriting from 'sf
' can be used with 'SfArray
'-class objects.
## S4 replacement method for signature 'VirtualArray,ANY,ANY,logical'
x[i, j, ...] <- value
## S4 replacement method for signature 'RasterArray,ANY,ANY,SpatRaster'
x[i, j, ...] <- value
## S4 replacement method for signature 'SfcArray,ANY,ANY,sfc'
x[i, j, ...] <- value
## S4 replacement method for signature 'SfArray,ANY,ANY,sf'
x[i, j, ...] <- value
x |
|
i |
subscript of the first dimension(rows) or vector-like subsetting. |
j |
subscript of the second dimension (columns). |
... |
subscript of additional dimensions. |
value |
A same class object as |
The function has no return value.
ex <- rastex()
# replace third element with missing value
ex[3] <- NA
# duplicate first element and make it the second too
ex[2] <- ex[1]
ex
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.