subjectProfileLinePlot {patientProfilesVis} | R Documentation |
Visualize subject profiles of the evolution of continuous parameters versus time (spaghetti plot).
Description
Visualize subject profiles of the evolution of continuous parameters versus time (spaghetti plot).
Usage
subjectProfileLinePlot(
data,
paramValueVar,
paramLab = getLabelVar(paramValueVar, labelVars = labelVars),
paramNameVar = NULL,
paramVarSep = " - ",
paramValueRangeVar = NULL,
colorValueRange = "lightgreen",
yLimFrom = c("all", "value"),
colorVar = NULL,
colorLab = getLabelVar(colorVar, labelVars = labelVars),
colorPalette = NULL,
shapeVar = colorVar,
shapeLab = if (isTRUE(colorVar == shapeVar)) {
colorLab
} else
getLabelVar(shapeVar, labelVars = labelVars),
shapePalette = NULL,
paramGroupVar = NULL,
timeVar,
timeLab = getLabelVar(timeVar, labelVars = labelVars),
timeTrans = NULL,
timeExpand = NULL,
subjectVar = "USUBJID",
subjectSubset = NULL,
subjectSample = NULL,
seed = 123,
subsetData = NULL,
subsetVar = NULL,
subsetValue = NULL,
xLab = timeLab,
yLab = "",
timeLim = NULL,
title = toString(getLabelVar(paramValueVar, labelVars = labelVars, label = paramLab)),
label = title,
labelVars = NULL,
formatReport = subjectProfileReportFormat(),
paging = TRUE,
alpha = 1,
shapeSize = rel(1)
)
Arguments
data |
Data.frame with data. |
paramValueVar |
String, variable of |
paramLab |
Named character vector,
with label for the parameter variable(s) ( |
paramNameVar |
Character vector with variable(s) of |
paramVarSep |
string with character(s) used to concatenate multiple
|
paramValueRangeVar |
Character vector of length 2 containing
variables of |
colorValueRange |
String with color for the filling of
the ribbon represented by |
yLimFrom |
String with specification on the limits of the y-axis, either:
|
colorVar |
String, variable of |
colorLab |
String, label for |
colorPalette |
Named vector with color palette.
The variable should be named with the corresponding element
in
|
shapeVar |
String, variable of |
shapeLab |
String, label for |
shapePalette |
Named character vector with shape palette
for
Note it is advised to specify the shapes as character,
e.g. 'cross' instead of |
paramGroupVar |
(optional) Character vector with variable(s)
of |
timeVar |
String, variable of |
timeLab |
String, label for |
timeTrans |
transformation for the time variable,
(see |
timeExpand |
Vector of range expansion constants for the time axis
(see |
subjectVar |
String, variable of |
subjectSubset |
(optional) Character vector with subjects of interest
(available in |
subjectSample |
(optional) Integer of length 1 with number of random subject(s) that should be considered, e.g. to check the created patient profiles for a subset of the data. By default, all specified subjects are considered (set to NULL). |
seed |
(optional) Integer of length 1 with seed used to select random subjects
if |
subsetData |
(optional) Data.frame with extra dataset to filter on.
This dataset is filtered, and only records from |
subsetVar |
(optional) String with variable of subset data to filter on.
|
subsetValue |
(optional) Character vector with value(s) of interest to
retain in the filtered data.
These values should be available in |
xLab |
String, label for the x-axis. |
yLab |
String, label for the y-axis. |
timeLim |
(optional) Vector of length 2 with time limits (x-axis).
If not specified, these are extracted from the minimum |
title |
String with title, label of the parameter value variable by default. |
label |
String, label for the visualization.
This label is stored as attributes of the output
from the |
labelVars |
Named character vector with variable labels (names are the variable code) |
formatReport |
list with parameters used to specify the format of the report,
e.g. output of the |
paging |
Logical, if TRUE (by default), automatic
paging is enabled, so patient profiles module too big to fit
in one page will span multiple pages.
Please note that the size of the graphic window
(or report page) may need
to be re-sized in order that the plot fits.
|
alpha |
Numeric with transparency, 1 by default. |
shapeSize |
Size for the symbols, any integer or
object supported by |
Value
List of (across subjects) of list (across modules)
of ggplot2 objects
,
also of class subjectProfileLinePlot
.
Each subject profile contains attributes: 'subjectID' and 'nLines'
(estimated number of lines of space the plot will take).
The entire list also contains attributes: 'label
',
'timeLim' and 'timeTrans' (if specified).
Author(s)
Laure Cougnaud
See Also
Other patient profiles plotting function:
subjectProfileEventPlot()
,
subjectProfileIntervalPlot()
,
subjectProfileTextPlot()