Updates elements of an array at specified positions, returning a new array.
You can also use the [<- operator.
Usage
# S3 method for class 'AnvlBox'
x[...] <- value
# S3 method for class 'AnvlArray'
x[...] <- value
nv_subset_assign(x, ..., value)Arguments
- x
(
arrayish)
Array to update.- ...
Subset specifications, one per dimension. See
vignette("subsetting")for details.- value
(
arrayish)
Replacement values. Scalars are broadcast to the subset shape. Non-scalar values must match the subset shape.
Value
arrayish
A new array with the same shape as x and the subset replaced.
See also
nv_subset(), vignette("subsetting") for a comprehensive guide.