ggplot
of a text variable of interest.The labels extracted based on the text
parameter
and displayed at the x-position based on xVar
and the y-position based on
colorVar
.
Each group specified in the color variables are displayed in different
lines in the plot.
subjectProfileSummaryTable(
data,
xVar,
text,
xLim = NULL,
colorVar = NULL,
colorPalette = NULL,
colorLab = getLabelVar(colorVar, labelVars = labelVars),
fontface = 1,
xLab = NULL,
labelVars = NULL,
caption = NULL,
showLegend = TRUE,
legendPosition = ifelse(showLegend, "right", "none"),
yAxisLabs = FALSE,
xAxisLabs = NULL,
style = "report",
fontname = switch(style, report = "Times", presentation = "Tahoma"),
fontsize = switch(style, report = 8, presentation = 10),
pointSize = 1.5,
themeFct = switch(style, report = theme_classic, presentation = theme_bw),
textSize = fontsize/ggplot2::.pt,
xTrans = NULL
)
ggplot
object
Data.frame (in long format) with data for the table.
String, variable of data
with variable for the x-axis.
Character vector with colnames of data
or expression based on colnames of data
to extract
the text label.
Vector of the length 2 with limits for the x-axis.
String, variable of data
for coloring.
(named) Vector with color palette.
String, label for colorVar
, used in the legend.
Numeric, fontface for the text.
String with label for the x-axis.
Named string with variable labels (names are the variable code).
String with caption for the plot, NULL by default.
Logical, should the legend be displayed? TRUE by default.
String with legendPosition, 'right' by default.
Logical, if TRUE include the labels in the y-axis.
Vector with labels for the x-axis if xVar
is discrete or vector with limits if continuous.
String with subject profile style.
This affects the parameters: fontname
, fontsize
and themeFct
.
String with font name,
by default 'Times' if style
is 'report' and
'Tahoma' if style
is 'presentation'.
Numeric vector of length 1 with font size,
by default 8 if style
is 'report' and
10 if style
is 'presentation'
Numeric indicating the size of points in the legend, 1.5 by default
Function with ggplot2 theme,
by default theme_classic
if style
is 'report' and
theme_bw
if style
is 'presentation'.
Size for the text.
(optional) ggplot2 transformation for the x-axis.
Laure Cougnaud and Michela Pasetto