View source: R/arrayToDataFrame.R
arrayToDataFrame | R Documentation |
Convert Array to Data Frame
arrayToDataFrame(x, name = deparse(substitute(x)))
x |
an array |
name |
name to be given to the value column |
data frame with as many rows as there are elements in the input array
x
. The data frame has one column per dimension of x
containing the dimension names and one additional column called according
to name
containing the array values.
x <- array(1:24, dim = c(2, 3, 4), dimnames = list(
c("a", "b"),
c("x", "y", "z"),
c("r", "s", "t", "u")
))
arrayToDataFrame(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.