This function is used in each plotting function of the package
to extract the variable(s) displayed in the table associated to the
plot and their associated labels.
This can also be used in the template reports, e.g. to extract
reference variable(s) for the comparison table functionality
in the plot template report.
The following framework is used:
if variables to be displayed in the table (tableVars
)
are not specified:
all variables displayed in the plot
are selected, based on the plot arguments.
For example: the variables
displayed in the x and y axis and for coloring are extracted
for the scatterplotClinData
plotting function.
Label for these variable(s) are extracted from the associated parameter
(e.g. xLab
for xVar
and so on) or the general
parameter for the variable labels (labelVars
) if not specified.
if variables to be displayed in the table (tableVars
)
are specified:
these variable(s) are returned.
The associated label(s) are extracted from the associated
parameter (tableLab
) or the general
parameter for the variable labels (labelVars
) if not specified.
For the functions: plotCountClinData
,
treemapClinData
, sunburstClinData
:
value to represent are included in the table and colored with a bar.
getPlotTableVars(plotFunction, plotArgs)
Character vector with variable to include in the table,
with extra attributes (passed to tableClinData
):
'tableLab': Named character vector with labels for the table variables
'tablePars' : extra table parameters, only included if specified as input or specified internally.
labels and the table parameters .
String with name of the plotting function,
be available in the clinDataReview package
.
List with parameters passed to the plotting function.
Laure Cougnaud