subjectProfileSummaryTable | R Documentation |
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
)
data |
Data.frame (in long format) with data for the table. |
xVar |
String, variable of |
text |
Character vector with colnames of |
xLim |
Vector of the length 2 with limits for the x-axis. |
colorVar |
String, variable of |
colorPalette |
(named) Vector with color palette. |
colorLab |
String, label for |
fontface |
Numeric, fontface for the text. |
xLab |
String with label for the x-axis. |
labelVars |
Named string with variable labels (names are the variable code). |
caption |
String with caption for the plot, NULL by default. |
showLegend |
Logical, should the legend be displayed? TRUE by default. |
legendPosition |
String with legendPosition, 'right' by default. |
yAxisLabs |
Logical, if TRUE include the labels in the y-axis. |
xAxisLabs |
Vector with labels for the x-axis if |
style |
String with subject profile style.
This affects the parameters: |
fontname |
String with font name,
by default 'Times' if |
fontsize |
Numeric vector of length 1 with font size,
by default 8 if |
pointSize |
Numeric indicating the size of points in the legend, 1.5 by default |
themeFct |
Function with ggplot2 theme,
by default |
textSize |
Size for the text. |
xTrans |
(optional) ggplot2 transformation for the x-axis. |
ggplot
object
Laure Cougnaud and Michela Pasetto
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.