Description Usage Arguments Value See Also Examples
Returns a matrix of integers indicating the number of their slice in a given array.
1 | slice.index(x, MARGIN)
|
x |
an array. If |
MARGIN |
an integer giving the dimension number to slice by. |
An integer array y
with dimensions corresponding to those of
x
such that all elements of slice number i
with respect
to dimension MARGIN
have value i
.
row
and col
for determining row and column
indexes; in fact, these are special cases of slice.index
corresponding to MARGIN
equal to 1 and 2, respectively when x
is a matrix.
1 2 | x <- array(1 : 24, c(2, 3, 4))
slice.index(x, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.