lab_summary: A laboratory level summary bar plot

View source: R/03_lab_summary.R

lab_summaryR Documentation

A laboratory level summary bar plot

Description

This functions creates a barplot for each treatment that shows the percentage subjects below the lower limit of normal (LLN) and above the upper limit of normal (ULN)

Usage

lab_summary(
  adlb,
  kind = "abnormal",
  param_filter,
  title = NULL,
  shift_breaks_vec = NULL,
  selected_visit = c("Baseline", "Week 2", "Week 4", "Week 6", "Week 8",
    "End of Treatment")
)

Arguments

adlb

Laboratory dataset

kind

The type of visualization. Options are 'abnormal', 'box', and 'shift'. Default is 'abnormal'.

param_filter

Character. The filtration applies on 'PARAM' variable.

title

the main title of the plot.

shift_breaks_vec

the break x & y axis for shift plot.

selected_visit

Vector of characters. The filtration on 'AVISIT' variable.

Value

A ggplot object

Examples

## Not run: 

 load("data/adlbc.rda")

 lab_summary(adlb = adlbc,
             kind = "abnormal",
             param_filter = "Cholesterol (mmol/L)",
             selected_visit = c("Baseline", "Week 2", "Week 4", "Week 6", "Week 8", "End of Treatment")
            )

 lab_summary(adlb = adlbc,
             kind = "box",
             param_filter = "Cholesterol (mmol/L)",
             selected_visit = c("Baseline", "Week 2", "Week 4", "Week 6", "Week 8", "End of Treatment")
            )


## End(Not run)

DMC21cent/DMC21cent documentation built on May 14, 2023, 5:53 p.m.