reorder.tensor: Permutation of indices and storage sequence of a tensor
Description
This permutes tensor dimensions like aperm. However the interface is
more flexible since not all dimensions have to given and names can be
used instead of numbers.
Usage
# S3 method for tensor
reorder(x,i=NULL,...,by=NULL)
Arguments
x
the tensor
i
numeric or character giving dimensions intended to come
first
…
further arguments to other instances of the generic function
by
the complement of i, if i is not given
Value
reorder.tensor returns a tensor equal to x but stored with a different
sequence of dimensions.
Details
the remaining dimensions keep their relative sequence and follow at
the end of the dimension attribute.