Learn R Programming

patientProfilesVis (version 2.0.8)

getOptimalColWidth: Get optimal column widths, based on the minimum word size and median number of characters in each column.

Description

Get optimal column widths, based on the minimum word size and median number of characters in each column.

Usage

getOptimalColWidth(
  data,
  widthValue = ifelse(formatReport$landscape, 240, 190),
  labels = NULL,
  formatReport = subjectProfileReportFormat()
)

Value

Numeric vector of length(ncol(data)) with optimal widths.

Arguments

data

Data.frame with columns for which optimal width should be extracted.

widthValue

max number of characters in the paramValueVar parameter.

labels

(optional) Character vector with column labels for data.

formatReport

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

Author

Laure Cougnaud