R/df_to_stanarray.R
df_to_stanarray.RdConverts a data frame to the output structure of extract
df_to_stanarray(df)
| df | data frame with the column names 'parameters', 'iterations' and 'chains' |
|---|
An array from df with the dimensions [iteration, chain, parameters]
df <- data.frame( parameters = c('mu', 'mu'), iterations = c(0.345, 0.263), chains = c(1, 2), stringsAsFactors = FALSE ) df_to_stanarray(df)#> , , parameters = mu #> #> chains #> iterations chain:1 chain:2 #> [1,] 0.345 0.263 #>