pkaeplot: Overlay adverse event duration on concentration-time curve...

Description Usage Arguments Details Value Examples

Description

pkaeplot creates a plot showing duration of adverse events in each subjects overlayed on individual concentration-time curve

Usage

1
2
3
4
pkaeplot(pk, ae, subj, ae.data.first.day = 0, scale.y.log10 = T,
  x.range = NULL, y.range = NULL, ae.col.var = "AE", ae.col.name = NULL,
  pk.col.var = NULL, ae.palette = c("#56B4E9", "#0072B2", "#D55E00"),
  ggtheme = NULL)

Arguments

pk

dataset containing individual pharmacokinetic profiles

ae

dataset containing adverse event profiles

ae.data.first.day

assign 1 if the first study day is recorded as DAY=1 in AE dataset and DAY=0 in PK dataset

scale.y.log10

logical value controlling Y axis scale

x.range

range of X axis to display

y.range

range of Y axis to display for active arm

ae.col.var

variable to set colors of AE (e.g. AE grade, AE type)

ae.col.name

name appearing in legend for different colors of AE curves

pk.col.var

variable to set colors of background PK curves (e.g. DOSE)

ae.palette

color palette for AE scales

ggtheme

specify ggplot theme (set NULL to use current theme)

Details

The function returns a list of ggplot objects, including (1) plot for active arm, (2) plot for placebo arm, and (3) legend.

Value

list of ggplot objects

Examples

1
2
3
4
pkaeplot(pk = pk.sim.profile.sparse,
         ae = ae.sim.profile,
         ae.data.first.day = 1,
         y.range=c(0.3,3))

yoshidk6/PKAEvis documentation built on May 4, 2019, 5:33 p.m.