createSubjectProfileReport {patientProfilesVis} | R Documentation |
Create subject profile report.
Description
By default all subjects available in at least one module of listPlots
are considered.
If only a set of subjects are of interest, these are specified either:
directly with the subject IDs of interest via
subjectSubset
by extracting subjects with a specific value (
subjectSubsetValue
) in a variable (subjectSubsetVar
) in a specific datasetsubjectSubsetData
Usage
createSubjectProfileReport(
listPlots,
timeLim = NULL,
timeAlign = "all",
timeAlignPerSubject = "none",
refLines = NULL,
refLinesData = NULL,
refLinesTimeVar = NULL,
refLinesLabelVar = NULL,
bookmarkData = NULL,
bookmarkVar = NULL,
subjectSortData = bookmarkData,
subjectSortVar = bookmarkVar,
subjectSortDecreasing = FALSE,
subjectVar = "USUBJID",
subjectSubset = NULL,
subjectSubsetData = NULL,
subjectSubsetVar = NULL,
subjectSubsetValue = NULL,
subjectSample = NULL,
seed = 123,
subset = NULL,
outputFile = "subjectProfile.pdf",
exportFigures = FALSE,
reportPerSubject = FALSE,
exportBatchSize = NULL,
labelVars = NULL,
maxNLines = NULL,
shiny = FALSE,
formatReport = subjectProfileReportFormat(),
verbose = FALSE,
nCores = 1
)
Arguments
listPlots |
nested list of plots, as returned by the |
timeLim |
Time limits, as a numeric vector of length 2,
or a list with time limits for each module,
or nested list with time limits for each module and subject.
If not specified, these are set to the time limits specified
when creating each module (stored in |
timeAlign |
Character vector with time alignment across modules/subjects, either:
|
timeAlignPerSubject |
Character vector, specifying if the plots should be aligned (or not) across subjects
Only the modules already specified in |
refLines |
(optional) nested list with details for reference line(s). Each sublist contains:
|
refLinesData |
data.frame with data from which the reference line(s) should be extracted |
refLinesTimeVar |
string, variable of |
refLinesLabelVar |
string, variable of |
bookmarkData , bookmarkVar |
Data.frame with data containing information for the index,
and character vector with corresponding variable(s) of interest.
An index will be created at the end of the subject profile report. |
subjectSortData |
Data.frame with data containing information on how the subjects
should be sorted (by default same as
This data should contain |
subjectSortVar |
Character vector,
variable(s) of |
subjectSortDecreasing |
Logical, if TRUE (FALSE by default)
subjects are sorted based on decreasing order of |
subjectVar |
String, variable of |
subjectSubset |
subjectSubset (optional) Character vector with subjects of interest
(available in |
subjectSubsetData |
Data.frame used to select subset of subjects of interest. |
subjectSubsetVar |
String with variable of |
subjectSubsetValue |
Character vector with value(s) of |
subjectSample |
(optional) Integer of length 1 with number of random subject(s) that should be considered in the specified subset dataset. By default, all specified subjects are considered (set to NULL). |
seed |
(optional) Integer of length 1 with seed used to select random subjects
if |
subset |
Character vector with subjects of interest
(among names of each list in |
outputFile |
string, path to the output report |
exportFigures |
Logical, if TRUE (FALSE by default) the
subject profile figures are also exported
in pdf format in a 'figures' folder. |
reportPerSubject |
Logical, if TRUE (FALSE by default) export a subject profile report by subject. |
exportBatchSize |
(optional) Integer, if specified, the
patient-profile reports are created by batch of this number of subjects.
This might speed up the export for a high number of subjects.
Only available if report is created by subject ( |
labelVars |
Named character vector with variable labels (names are the variable code) |
maxNLines |
Maximum number of lines for a combined plot,
to fit in the page height. |
shiny |
logical, set to TRUE (FALSE by default)
if the report is generated from a Shiny application.
Messages during report creation will be included in the Shiny interface,
and it will be mentioned at the end of the report.
In this case, the |
formatReport |
list with parameters used to specify the format of the report,
e.g. output of the |
verbose |
logical, if TRUE print messages during execution |
nCores |
Integer containing the number of cores used for the computation
(1 by default). If more than 1, computation is parallelized, in this case
the package |
Value
The path(s) of the report(s) is returned invisibly, and the
report is created at the location
specified by outputFile
.
If the report is created by subject,
the name of the exported subject profile is built as:
[filename]-[subjectID].pdf
, with [filename] extracted from
outputFile
.
Space and platform-specific file separator are replaced by
a dash in the filename.
If no patient profiles are available in the input,
nothing is returned and a warning is triggered.
Author(s)
Laure Cougnaud