Skip to contents

Creates comprehensive line charts for time series analysis and trend visualization in clinical and pathological research. This function supports multiple groups, confidence intervals, trend lines, and statistical overlays, making it ideal for analyzing longitudinal data, treatment responses, and biomarker trends over time.

Details

The line chart function is designed specifically for clinical research applications where visualization of trends and patterns over time or ordered categories is crucial. It provides extensive customization options and statistical features to create publication-ready plots for clinical studies.

Key features:

  • Multiple group support for comparative analysis

  • Confidence intervals and trend lines

  • Clinical color palettes and themes

  • Reference lines for normal ranges/thresholds

  • Statistical correlation analysis

  • Professional publication-ready appearance

Common clinical applications:

  • Laboratory values over time

  • Treatment response monitoring

  • Biomarker evolution

  • Dose-response relationships

  • Survival probability trends

  • Quality metrics tracking

Super classes

jmvcore::Analysis -> ClinicoPath::linechartBase -> linechartClass

Examples

if (FALSE) { # \dontrun{
# Basic time series analysis
result <- linechart(
  data = patient_data,
  xvar = "visit_month",
  yvar = "hemoglobin_level"
)

# Grouped analysis with confidence intervals
result <- linechart(
  data = treatment_data,
  xvar = "time_point",
  yvar = "tumor_size",
  groupby = "treatment_arm",
  confidence = TRUE,
  trendline = TRUE
)

# Clinical monitoring with reference line
result <- linechart(
  data = lab_data,
  xvar = "days_post_treatment",
  yvar = "white_blood_cell_count",
  refline = 4000,
  reflineLabel = "Normal Lower Limit"
)
} # }