Skip to contents

Mean with confidence interval by visit

Usage

fig_meanci(
  df,
  ctx = fig_ctx(),
  value_col = "AVAL",
  ci = 0.95,
  point_labels = FALSE,
  show_n = FALSE,
  base_size = NULL,
  config = NULL
)

Arguments

df

Analysis data (BDS).

ctx

A fig_ctx() list.

value_col

"AVAL" or "CHG".

ci

Confidence level.

point_labels

Print the mean above each point?

show_n

Print per-visit N under the panel?

base_size

Font size; NULL uses the configuration.

config

A tlf_config(); NULL resolves through tlf_get_config().

Value

A ggplot.

Examples

p <- fig_meanci(ex_adlb[ex_adlb$PARAMCD == "ALT", ])
class(p)
#> [1] "ggplot2::ggplot" "ggplot"          "ggplot2::gg"     "S7_object"      
#> [5] "gg"