df_to_array | R Documentation |
Convert a data.frame object to an array
df_to_array(data, covariates, value.var, fill = 0)
data |
A data.frame. |
covariates |
Character vector. The covariates to use for array dimensions. Unselected dimensions will be collapsed. |
value.var |
Character. The name of the column which contains the value for the array. |
fill |
Numeric. The value to use when the combination of covariates does not exist in the data.frame |
An array whose dimensions correspond to the selected covariates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.