set_as_rows {listarrays} | R Documentation |
Reshape an array to send a dimension forward or back
Description
Reshape an array to send a dimension forward or back
Usage
set_as_rows(X, which_dim)
set_as_cols(X, which_dim)
Arguments
X |
an array |
which_dim |
scalar integer or string, which dim to bring forward. Negative numbers count from the back This is a powered by |
Value
a reshaped array
See Also
base::aperm()
set_dim()
keras::array_reshape()
Examples
x <- array(1:24, 2:4)
y <- set_as_rows(x, 3)
for (i in seq_along_dim(x, 3))
stopifnot( identical(x[,,i], y[i,,]) )
[Package listarrays version 0.4.0 Index]