Shows individual patient trajectories over time with an optional group-level smoother.
Arguments
- df
Data frame.
- x
Character. Column name for x-axis (numeric, e.g., days).
- y
Character. Column name for y-axis (numeric).
- group
Character. Column name for grouping (e.g.,
"pat_id").- colour
Character. Column name for colour aesthetic. Default
NULL.- smoother
Logical. Add group-level LOESS smoother. Default
TRUE.- title
Character. Plot title. Default
NULL.