freqlist {arsenal} | R Documentation |
freqlist
Description
Approximate the output from SAS's PROC FREQ
procedure when using the /list
option of the TABLE
statement.
Usage
freqlist(object, ...)
## S3 method for class 'table'
freqlist(
object,
na.options = c("include", "showexclude", "remove"),
strata = NULL,
labelTranslations = NULL,
control = NULL,
...
)
## S3 method for class 'formula'
freqlist(
formula,
data,
subset,
na.action,
na.options = c("include", "showexclude", "remove"),
strata = NULL,
labelTranslations = NULL,
control = NULL,
addNA,
exclude,
drop.unused.levels,
...
)
Arguments
object |
An R object, usually of class |
... |
additional arguments. In the formula method, these are passed to the table method. These are also passed to
|
na.options |
a character string indicating how to handling missing values: |
strata |
(formerly |
labelTranslations |
an optional character string (or list) of labels to use for variable levels when summarizing. Names will be matched appropriately. |
control |
control parameters to handle optional settings within |
formula , data , subset , na.action , addNA , exclude , drop.unused.levels |
Arguments passed to |
Value
An object of class c("freqlist", "arsenal_table")
Author(s)
Tina Gunderson, with revisions by Ethan Heinzen
See Also
arsenal_table
, summary.freqlist
, freq.control
, freqlist.internal
,
table
, xtabs
Examples
# 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)
# show the top 6 rows' frequencies and percents
head(summary(sort(noby, decreasing = TRUE)[c(1:4, 6)]))
withby <- freqlist(tab.ex, strata = c("arm","sex"), na.options = "showexclude")
summary(withby)