df_to_array {serocalculator} | R Documentation |
Convert a data.frame (or tibble) into a multidimensional array
Description
Convert a data.frame (or tibble) into a multidimensional array
Usage
df_to_array(df, dim_var_names, value_var_name = "value")
Arguments
df |
a data.frame() (or tibble::tibble() ) in long format (each row contains one value for the intended array)
|
dim_var_names |
a character() vector of variable names in df . All of these variables should be factors, or a warning will be produced.
|
value_var_name |
a character() variable containing a variable name from df which contains the values for the intended array.
|
Value
an array()
with dimensions defined by the variables in df
listed in dim_var_names
[Package
serocalculator version 1.0.3
Index]