Learn R Programming

arsenal (version 0.5.0)

summary.freqlist: summary.freqlist

Description

Summarize the freqlist object

Usage

# S3 method for freqlist
summary(object, single = FALSE, labelTranslations = NULL,
  dupLabels = FALSE, ...)

Arguments

object

an object of class freqlist

single

a logical value indicating whether to collapse results created using a groupBy variable into a single table for printing

labelTranslations

A named list (or vector) where the name is the label in the output to be replaced in the pretty rendering of freqlist by the character string value for the named element of the list, e.g., list(age="Age(years)", bmi="Body Mass Index").

dupLabels

Should labels which are the same as the row above be printed? The default (FALSE) more closely approximates PROC FREQ output from SAS, where a label carried down from the row above is left blank.

...

additional arguments passed to the kable function (e.g., format = "pandoc")

Value

Invisibly returns object, and uses kable to print the object.

See Also

table, xtabs, kable

Examples

Run this code
# NOT RUN {
# load mockstudy data
data(mockstudy)
tab.ex <- table(mockstudy[, c("arm", "sex", "mdquality.s")], useNA = "ifany")
noby <- freqlist(tab.ex, na.options = "include")
summary(noby)
withby <- freqlist(tab.ex, groupBy = c("arm","sex"), na.options = "showexclude")
summary(withby)
summary(withby, dupLabels = TRUE)
# }

Run the code above in your browser using DataLab