gt_posterior: Format a gt table for posterior summary

Description Usage Arguments Details Value

View source: R/gt_posterior.R

Description

Format a gt table for posterior summary. Usually from quap, brm and inla.

Usage

1
2
3
4
5
6
7
8
9
gt_posterior(
  df,
  var_col = "var",
  labs = list(title = "Posterior Summary", subtitle = "Practice"),
  qtl = NULL,
  .data_color = "mintcream",
  .tab_options = NULL,
  digits = 2L
)

Arguments

df

Dataframe. Posterior summary.

var_col

Name of the column with the variables.

labs

List with the following items

qtl

List used to change the name of the quantile columns. Should be formatted as, for example.

.data_color

Data color used by gt::data_color()

.tab_options

List of tab_options with the following defaults

data

"mintcream"

heading.background.color

"lavender"

heading.title.font.weight

"bold"

heading.subtitle.font.weight

"bold"

column_labels.background.color

"oldlace"

column_labels.font.weight

"bold"

stub.background.color

"oldlace"

digits

Integer. Digits used to format data numbers.

Details

The format will rename the quantiles based on the qtl argument which must have the same number of element as the corresponding columns.

Value

gt table of posterior summary


FrankLef/eflRethinking documentation built on Dec. 17, 2021, 8:30 p.m.