.tidy_summary | R Documentation |
Creates "tidy" summaries in lieu of the stan rownames.
.tidy_summary(x, labs = NULL, ...)
x |
Output of .summarize |
labs |
The labels for each parameter index. E.g., "predictor", "factor" |
... |
Optional (but recommended). Mappings for indices. E.g., Index column 1 is replaced by ... |
.summarize creates an rstan-like summary with rownames, mat[1:R, 1:C]
.
.tidy_summary(mat, c("rows", "cols"))
would then create two new columns, "rows" and "cols" with the indices in them.
If arguments are provided in ...
, then these indicate the mappings between the indices and labeled values.
E.g., .tidy_summary(mat, c("rows", "cols"), c("A", "B"), c("C", "D"))
would create two new columns, "rows" and "cols", and replace rows = 1 with rows = A; cols=2 with cols = D, and so on.
Useful for going from stan rownames, to labeled columns.
Data frame.
Stephen R. Martin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.