A static ggplot2 figure of the view the group comparison chart opens on: one
biomarker's value across the levels of a category, as boxes with the
participants as points, one panel per visit, with R's test of each panel
printed in its heading. It is the figure Widget_GroupComparison() draws in
the browser, from the same settings, and its tests are
Analyze_GroupDifference()'s on the same rows.
Usage
Visualize_GroupComparison(dfResults, dfParticipants = NULL, lSettings = list())Arguments
- dfResults
data.frameLong-format results, one row per participant, biomarker and visit. Column names are supplied bylSettings; the defaults expectUSUBJID/TEST/STRESN/VISIT/VISITNUM/STRESU, the columns of Synthetic_Results.- dfParticipants
data.frameOne row per participant, orNULL. With it the chart has filters, and offers its category columns to group, colour and panel by; it also says who the participants are. Without it a group comes from a column carried on the results rows. Default:NULL.- lSettings
listbio.viz group comparison settings, asWidget_GroupComparison()takes them, andtitle,subtitleandfootnotes. A figure is of one biomarker, sostart_valuemust name it. Default:list().
Titles and footnotes
The settings title, subtitle and footnotes are text with named
placeholders, as the chart takes them: a name in braces is replaced by the
text of its value, and a name the figure does not have is left as written.
This figure fills {measure}, {visits}, {value}, {group}, {n} (the
participants drawn), {filters}, {date} and {version}. The last line
under the figure is always its own: the date it was drawn, by gsm.bio, and
R's method and counts behind each test printed, with the R and gsm.bio
versions that computed them.
See also
Widget_GroupComparison(), its interactive twin, and
Analyze_GroupDifference(), which computes the tests.
Other figures:
Run_Specifications(),
Visualize_AssociationScatter(),
Visualize_BiomarkerScreen(),
Visualize_CorrelationMatrix(),
Visualize_CrossTab(),
Visualize_StratifiedSurvival()
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
Visualize_GroupComparison(
Synthetic_Results,
Synthetic_Participants,
lSettings = list(
start_value = "IL-6",
visits = c("Week 4", "Week 8"),
value_type = "change",
baseline_visits = "Baseline",
group_by = "ARM",
title = "{measure}: {value} by {group}",
subtitle = "{n} participants, at {visits}"
)
)
}