df_to_stanarray: Converts a data frame to the output structure of extract

View source: R/df_to_stanarray.R

df_to_stanarrayR Documentation

Converts a data frame to the output structure of extract

Description

Converts a data frame to the output structure of extract

Usage

df_to_stanarray(df)

Arguments

df

data frame with the column names 'parameters', 'iterations' and 'chains'

Value

An array from df with the dimensions [iteration, chain, parameters]

Examples

df <- data.frame(
              parameters = c('mu', 'mu'),
              iterations = c(0.345, 0.263),
              chains = c(1, 2),
              stringsAsFactors = FALSE
              )
df_to_stanarray(df)

WarwickCIM/backfillz documentation built on Sept. 27, 2022, 5:41 a.m.