Individual-subject lines with an optional mean overlay
Usage
fig_spaghetti(
df,
ctx = fig_ctx(),
value_col = "AVAL",
mean_overlay = TRUE,
line_alpha = 0.25,
ci = 0.95,
base_size = NULL,
config = NULL
)Arguments
- df
Analysis data (BDS).
- ctx
A
fig_ctx()list.- value_col
"AVAL"or"CHG".- mean_overlay
Overlay the mean with a CI ribbon?
- line_alpha
Transparency of subject lines.
- ci
Confidence level.
- base_size
Font size;
NULLuses the configuration.- config
A
tlf_config();NULLresolves throughtlf_get_config().
See also
Other figure builders:
fig_boxplot(),
fig_edish(),
fig_forest(),
fig_km(),
fig_lsmeans(),
fig_meanci(),
fig_shift(),
fig_waterfall()
Examples
p <- fig_spaghetti(ex_adlb[ex_adlb$PARAMCD == "ALT", ])
class(p)
#> [1] "ggplot2::ggplot" "ggplot" "ggplot2::gg" "S7_object"
#> [5] "gg"