There are two ways to specify the variables of interest to include:
by specifying column(s) of interest containing parameter values, passed
to the paramValueVar
parameter.
In this case, variable value is displayed in the plot area,
and variable name in the label of the y-axis, as:
variable 1 | value 1 - value 2 - ...
variable 2 | value 1 - value 2 - ...
by specifying column(s) of interest containing parameter values,
displayed as a table
.
In this case, variable are displayed in columns
in the plot area. Variable names are displayed
on top of table, and associated values below, as:
| variable 1 variable 2
| value 1 value 1
| ...
by specifying a combination of a variable containing the parameter name
(paramNameVar
), coupled with a variable containing the
parameter values (paramValueVar
).
In this case, parameter values (if multiple) are concatenated
and displayed in the plot area for each parameter name,
displayed in the label of the y-axis, as:
variable name 1 | variable value 1 - variable value 2 - ...
variable name 2 | variable value 1 - ...
subjectProfileTextPlot(
data,
paramValueVar,
paramValueLab = getLabelVar(paramValueVar, labelVars = labelVars),
paramNameVar = NULL,
paramGroupVar = NULL,
subsetData = NULL,
subsetVar = NULL,
subsetValue = NULL,
subjectVar = "USUBJID",
subjectSubset = NULL,
subjectSample = NULL,
seed = 123,
xLab = "",
yLab = "",
title = "Subject information",
label = title,
labelVars = NULL,
paramVarSep = " - ",
formatReport = subjectProfileReportFormat(),
paging = TRUE,
table = FALSE,
colWidth = NULL
)
list of (across subjects) of list (across modules) of ggplot2 objects
,
also of class subjectProfileTextPlot
, with additional metaData
attributes containing
'label
' and 'timeLim'.
Data.frame with data.
Character vector, either:
vector with names of variable(s) (multiple are possible)
of data
of interest.
The values are displayed in the plot area and variable name in the labels
of the y-axis.
Multiple variables can be concatenated in the same line by specifying them,
as an unique string separated by a 'pipe', e.g 'SEX|AGE'. Variable
label(s) are concatenated (with ', ') and displayed in the y-axis.
if paramNameVar
is specified:
character vector with names of variable(s) (multiple possible)
of data
with values to represent in the plot area.
function taking data
as input and
returning a new variable (of length equal to number of rows in data
)
with parameter value to represent
(optional) Named character vector with
labels for paramValueVar
.
(optional) Character vector of length 1 with
variable of data
with parameter name. This
is displayed in the labels of the y-axis.
(optional) Character vector with variable(s)
of data
based on which the data will be grouped and sorted
(in the y-axis) in the plot.
(optional) Data.frame with extra dataset to filter on.
This dataset is filtered, and only records from data
with common subject IDs will be retained.
If not specified, data
is used.
(optional) String with variable of subset data to filter on.
subsetValue
should be specified too.
If not specified, all records from the subset data are retained.
(optional) Character vector with value(s) of interest to
retain in the filtered data.
These values should be available in subsetVar
.
Missing values in the subject variable are not retained
in the filtered data.
String, variable of data
with subject ID
(optional) Character vector with subjects of interest
(available in subjectVar
), NULL by default.
(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).
(optional) Integer of length 1 with seed used to select random subjects
if subjectSample
is specified (123 by default).
String, label for the x-axis.
String, label for the y-axis.
String with title, 'Subject information' by default.
String, label for the visualization.
This label is stored as attributes of the output
from the subjectProfile[]Plot
function.
This label is displayed in the final profile
report, in case no data is available for
for a specific patient, as: 'No [label] available.'
Named character vector with variable labels (names are the variable code)
String (' - ' by default) with character(s) used to concatenate multiple variables for the same record in the plot area.
list with parameters used to specify the format of the report,
e.g. output of the subjectProfileReportFormat
function
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.
If FALSE, the entire plot is included in one single page.
Logical, if TRUE (FALSE by default) the information
contained in the variables: paramValueVar
is displayed as a table.
Otherwise, the values of the different variables are concatenated in the same line.
Numeric vector with approximate
width of each parameter value column
for a table layout.
For example in case two parameters are specified:
c(0.8, 0.2))
such as the first column
takes 80% of plot area, and the second column 20%.
Note: columns can be slightly bigger if their content is
larger than the specified width.
If not specified, column width is optimized
based on the max length of the character in each column.
Laure Cougnaud
Other patient profiles plotting function:
subjectProfileEventPlot()
,
subjectProfileIntervalPlot()
,
subjectProfileLinePlot()