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,
bar_label = 0,
cycle_label = FALSE,
cycle_vals = NA,
cycle_labs = NA,
summary_only = FALSE,
summary_highlight = FALSE,
cycles_only = TRUE,
x_lab_angle = 0,
x_lab_vjust = 1,
x_lab_hjust = 0,
x_label = "Randomized Treatment Assignment",
y_label = "Percent of Total Frequency",
footnote_break = FALSE,
suppress_legend = FALSE,
add_item_title = 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. These objects can be modified as such.
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 scores 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 score 0 or higher), 2 = sample size (n)
within each cycle with present symptoms (symptom score > 0), 3 =
sample size (n) within each cycle with severe symptoms (symptom score >=
3), 4 = percent of subjects within each cycle with present
symptoms (symptom score > 0), 5 = percent of subjects within each
cycle with severe symptoms (symptom score >= 3). No labels will be applied
if not specified. Defaults to NA.
Logical. Assign custom labels to cycles/time point. If
TRUE, the cycle_vals and cycle_labs must also be specified.
Numeric column vector. Vector of values seen within the
cycle_var variable. Must be same length of cycle_labs. Defaults
to NA.
Character column vector. Vector of labels to be mapped to
the associated cycle_vals. Must be same length of cycle_vals.
Defaults to NA.
Logical. Only display the summary measures in figures /
Suppress the individual time points from plotting. Defaults to
FALSE.
Logical. Add black box around summary measure bar
chart. Defaults to FALSE.
Logical. Only display the longitudinal time points in
figures / Suppress the summary measures from plotting. Defaults to
TRUE.
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.
A character string. Label for the y axis of the plot. Defaults
to "Percent of Total Frequency".
Logical. Add a line break to the footnote Defaults to
FALSE.
Logical. Suppress the legend from appearing in figure.
Defaults to FALSE.
Logical. Add the symptom item name as a title to the
figure. Defaults to FALSE.
if (FALSE) {
fig_acute = toxFigures(dsn = ProAE::tox_acute,
cycle_var = "Cycle",
baseline_val = 1,
arm_var = "arm",
id_var = "id",
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