Data format should be in 'long' format, where each PRO-CTCAE item is a variable/column.
toxFigures(
dsn,
id_var,
cycle_var,
baseline_val,
arm_var = NA,
plot_limit = NA,
colors = 1,
label = 0,
summary_only = FALSE,
cycles_only = FALSE,
x_lab_angle = 0,
x_lab_vjust = 1,
x_lab_hjust = 0,
x_label = "Randomized Treatment Assignment",
plot_data = FALSE
)A data.frame object with PRO-CTCAE data
A character string.Name of ID variable differentiating each PRO-CTCAE survey/participant entered as a quoted string.
A character string. Name of variable differentiating one longitudinal/repeated. PRO-CTCAE survey from another, within an individual ID.
A number indicating the expected baseline cycle/time point.
A character string. Name of arm variable differentiating
treatment groups. Must be character or factor class. Overall AUC
will be reported if no arm/grouping variable is provided. Defaults to
NA.
A number. Limit the number of cycles to be plotted up to
and including a given cycle number. All available cycle time points are
plotted if no cycle number is provided. Defaults to NA.
A number. Specify the coloring scheme of symptom grades within frequency bars. Options include: 1 = Blue and red color shading, 2 = qualitative color shades (color blind friendly), 3 = black and white. Defaults to 1.
A number. Label frequency bars with sample size (n) or percent
shown on the y-axis. Label options include: 1 = sample size (n)
within each cycle (symptom grade 0 or higher), 2 = sample size (n)
within each cycle with present symptoms (symptom grade > 0), 3 =
sample size (n) within each cycle with severe symptoms (symptom grade >=
3), 4 = percent of subjects within each cycle with present
symptoms (symptom grade > 0), 5 = percent of subjects within each
cycle with severe symptoms (symptom grade >= 3). No labels will be applied
if not specified. Defaults to NA.
Logical. Only display the summary measures in figures /
Suppress the individual time points from plotting. Defaults to
FALSE.
Logical. Only display the longitudinal time points in
figures / Suppress the summary measures from plotting. Defaults to
FALSE.
A integer between 0 and 360. Allows the user to rotate the
x axis labels in order to fit long arm names (0 or 45 recommended).
Defaults to 0.
A number. A ggplot2 object option. Allows the user to
vertically adjusts the x axis labels in order to fit arm names. Defaults to
1.
A number. A ggplot2 object option. Allows the user to
horizontally adjusts the x axis labels in order to fit arm names. Defaults
to 0.
A character string. Label for the x axis of the plot. Defaults
to "Randomized Treatment Assignment" if arm_var is specified,
defaults to "Overall" if not arm_var is specified.
Logical. Return the data used to construct plots as element
of the returned object. Defaults to FALSE.
A list object. The returned object is a (k X 2) or (k x 3) nested
list. Where k is the number of PRO-CTCAE item groups (e.g. pain, fatigue,
nausea); list[[1 ... i ... k]]. For each list item there are 2 or 3
elements. The 1st element of each list item is the name of the PRO-CTCAE
item group returned as a string. The 2nd element is the PRO-CTCAE figure as
a ggplot object. The 3rd (and optional) element is the data used to
construct the ggplot figure, available via plot_data.
# NOT RUN {
fig_acute = toxFigures(dsn = ProAE::tox_acute[c(1:300, 1101:1400),],
cycle_var = "Cycle",
baseline_val = 1,
arm_var = "arm",
id_var = "id",
label = 0,
x_lab_angle = -45,
x_lab_vjust = .3,
x_lab_hjust = .2,
colors = 2)
fig_acute[[1]]
# }
Run the code above in your browser using DataLab