Description Usage Arguments Value See Also
Convert an array to a data frame.
1 |
ar |
An array. |
data.frame. dim = c(prod(dim(ar)), length(dim(ar)) + 1).
Rows: One row per element of the array. Rows are "entered" into the data frame in column major order.
Columns: One column per dimension of the array, plus one column for the values in the array.
Column names are retained from names of array dimensions (names(dimnames(ar)).
Where non-existant, column names are given as "d#", where # is the index of the dimension.
For each column, if the corresponding array dimension was named, then the column is of
class character. Otherwise, the column is of class numeric.
The last column (the values from the array) is named "value".
pivot_longer, https://stackoverflow.com/a/42810479.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.