powered by
slice is an alternative interface to [ (extract). Dimensions to index must be given by name, i for the first, j for the second and so on.
slice
[
slice(a, ..., drop = TRUE)slice (a, ...) <- value
slice (a, ...) <- value
array
vector, matrix, or array
indexing instructions. The names of the arguments specify the dimension (i = 1st, j = 2nd, ...). The indexing expressions are the same as for [
see [
the values to assign
Claudia Beleites
slice (arrayhelpers:::a, j = 3 : 2) tmp <- arrayhelpers:::a slice (tmp, j = 2 : 3) <- 0 tmp
Run the code above in your browser using DataLab