formatVC: Format the 'VarCorr' Matrix of Random Effects

View source: R/VarCorr.R

formatVCR Documentation

Format the 'VarCorr' Matrix of Random Effects

Description

"format()" the VarCorr matrix of the random effects – for print()ing and show()ing

Usage

formatVC(
  varcor,
  digits = max(3, getOption("digits") - 2),
  corr_digits = max(2, digits - 2),
  maxdim = 10,
  comp = "Std.Dev.",
  formatter = format,
  useScale = attr(varcor, "useSc"),
  ...
)

Arguments

varcor

a VarCorr (-like) matrix with attributes.

digits

the number of significant digits for standard deviations and variances.

corr_digits

the number of significant digits for correlations.

maxdim

maximum dimensions (numbers of standard deviations/variances and number of rows of correlation matrices) to report per random effects term.

comp

character vector of length one or two indicating which columns out of "Variance" and "Std.Dev." should be shown in the formatted output.

formatter

the function to be used for formatting the standard deviations and or variances (but not the correlations which (currently) are always formatted as "0.nnn".

useScale

whether to report a scale parameter (e.g. residual standard deviation).

...

optional arguments for formatter(*) in addition to the first (numeric vector) and digits.

Value

a character matrix of formatted VarCorr entries from varcor.


reformulas documentation built on Dec. 17, 2025, 9:07 a.m.