spaghetti_plot.std_campsis_tbl: Spaghetti plot for standard Campsis simulation output.

View source: R/spaghetti_plot.R

spaghetti_plot.std_campsis_tblR Documentation

Spaghetti plot for standard Campsis simulation output.

Description

Plots individual-level time profiles from a std_campsis_tbl (the default output of simulate() when no custom outfun is used).

Usage

## S3 method for class 'std_campsis_tbl'
spaghetti_plot(x, variable = "CONC", colour = "auto", ...)

Arguments

x

a std_campsis_tbl object

variable

name of the column to plot on the y-axis. Defaults to "CONC". An informative error is raised when the column is absent.

colour

stratification for line colour. One of "auto", NULL, or a character vector of column names. See Details.

...

additional arguments (currently unused, reserved for future use)

Details

Colour stratification is resolved as follows:

  • "auto" (default): ARM is added when more than one distinct arm is detected in the data; SCENARIO is added when more than one distinct scenario is detected.

  • NULL: no colour mapping.

  • character vector: explicit column name(s) to colour by (forwarded directly to spaghettiPlot).

Value

a ggplot object

See Also

spaghettiPlot


campsis documentation built on Aug. 5, 2026, 9:07 a.m.