Description Usage Arguments Value Note See Also
View source: R/array_transform.R
array_
transforms its data argument to an array by reference. No
copy is made at all, and it invisibly returns the array.
1 |
x |
a data vector, matrix or array |
dim |
the dim attribute for the array to be created, that is an integer vector of length one or more giving the maximal indices in each dimension |
dimnames |
either NULL or the names for the dimensions. This must a list (or it will throw an error) with one component for each dimension, either NULL or a character vector of the length given by dim for that dimension. The list can be named, and the list names will be used as names for the dimensions. If the list is shorter than the number of dimensions, it is extended by NULLs to the length required. |
force_length |
logical. If TRUE (the default), |
arg_check |
logical indicating if argument checks should be performed (TRUE, the default). Do not set to FALSE unless you really know what you are doing! |
This function (invisibly) returns an array (or a matrix if
length(dim)==2L
) without duplicating the input values.
Use array_
with extra care because it modifies in place all
objects which x refers to. See matrix_
for further hints.
matrix_
for in-place transformation of x to a matrix
(without copy) and array
for creating a new array without
modifying the original input
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.