Learn R Programming

descsuppR (version 1.2)

calc_descr_matrix: calc_descr_matrix

Description

Wrapper for single vectors

Usage

calc_descr_matrix(
  ttt,
  format = "long",
  extraLevels = NULL,
  includeNAs = FALSE,
  includeNonNAs = FALSE,
  orderedAsUnordered = FALSE,
  factorlevellimit = 14,
  show.minmax = TRUE,
  show.IQR = FALSE,
  sd_digits = "by_mean",
  descr_digits = 2,
  significant_digits = TRUE
)

Value

matrix containing the descriptive values

Arguments

ttt

the data.frame

format

in c("long", "wide")

extraLevels

named list of lists. Names have to be variable names. Elements have to have to be named list of this form: `some label` = list(idxvec = idxvec, display = logical). Here idxvec needs to be a logical vector of length nrow(df) that specifies the affected rows. If display is TRUE the number of affected rows will be shown under some label.

includeNAs

boolean. include number of NAs in the output?

includeNonNAs

boolean. include number of non-NAs in the output?

orderedAsUnordered

logical. treat ordered factors as unordered factors?

factorlevellimit

integer. for factors with more than factorlevellimit levels, not all levels are printed

show.minmax

logical. if TRUE show minimum and maximum for numeric variables. Defaults to TRUE.

show.IQR

logical. if TRUE show 25% and 75% quantiles for numeric variables. Defaults to FALSE.

sd_digits

character. one of c("by_mean", "fixed"). If 'by_mean', the number of decimal places of the standard deviation is limited by the number of decimal places of the mean.

descr_digits

integer. Number of digits for formatting of descriptive values. Defaults to 2.

significant_digits

boolean. if TRUE, the number of significant digits of is given by descr_digits. Otherwise the number of decimal places is fixed.

Author

Andreas Leha

Details

calls the one dimensional functions