formatParamVarTextPlot {patientProfilesVis}R Documentation

Format text variables for the subject profile text plotting function.

Description

Text variables are wrapped across multiple lines if needed, and optionally sorted according to the levels of a grouping variable.

Usage

formatParamVarTextPlot(
  data,
  paramVar = NULL,
  paramValueVar = NULL,
  paramValueLab = NULL,
  paramGroupVar = NULL,
  revert = FALSE,
  width = formatReport$yLabelWidth,
  widthValue = ifelse(formatReport$landscape, 240, 190),
  formatReport = subjectProfileReportFormat(),
  table = FALSE,
  colWidth = NULL
)

Arguments

data

data.frame with data

paramVar

string, variable of data with parameter

paramValueVar

string, variable of data containing the parameter value.

paramValueLab

Character vector with labels for paramValueVar.

paramGroupVar

(optional) character vector with variable(s) of data with grouping. If specified, the parameters will be grouped by this(these) variable(s) in the y-axis.

revert

logical, if TRUE revert the order of the levels of the variable

width

max number of characters in the paramVar parameter.

widthValue

max number of characters in the paramValueVar parameter.

formatReport

list with parameters used to specify the format of the report, e.g. output of the subjectProfileReportFormat function

table

Logical, if TRUE the paramValueVar variables are displayed as table (so are not concatenated).

colWidth

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.

Value

data with reformatted paramVar and paramValueVar variables, with additional attribute: colWidth.

Author(s)

Laure Cougnaud

See Also

subjectProfileTextPlot


[Package patientProfilesVis version 2.0.7 Index]