getOptimalColWidth: Get optimal column widths, based on the minimum word size and...

View source: R/miscellaneous.R

getOptimalColWidthR Documentation

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()
)

Arguments

data

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

widthValue

max number of characters in the codeparamValueVar 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

Value

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

Author(s)

Laure Cougnaud


patientProfilesVis documentation built on Nov. 18, 2022, 5:12 p.m.