Description Usage Arguments Value Examples
View source: R/archived/tabfreq-2020-03-28.R View source: R/tabfreq.R
Creates an I-by-J frequency table comparing the distribution of y
across levels of x
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | tabfreq(
formula = NULL,
data = NULL,
x = NULL,
y = NULL,
columns = c("xgroups", "p"),
cell = "counts",
parenth = "col.percent",
sep.char = ", ",
test = "chi.fisher",
xlevels = NULL,
yname = NULL,
ylevels = NULL,
compress.binary = FALSE,
yname.row = TRUE,
text.label = NULL,
quantiles = NULL,
quantile.vals = FALSE,
decimals = 1,
formatp.list = NULL,
n.headings = FALSE,
kable = TRUE
)
|
formula |
Formula, e.g. |
data |
Data frame containing variables named in |
x |
Vector indicating group membership for columns of I-by-J table. |
y |
Vector indicating group membership for rows of I-by-J table. |
columns |
Character vector specifying what columns to include. Choices
for each element are |
cell |
Character string specifying what statistic to display in cells.
Choices are |
parenth |
Character string specifying what statistic to display in
parentheses. Choices are |
sep.char |
Character string with separator to place between lower and
upper bound of confidence intervals. Typically |
test |
Character string specifying which test for association between
|
xlevels |
Character vector with labels for the levels of |
yname |
Character string with a label for the |
ylevels |
Character vector with labels for the levels of |
compress.binary |
Logical value for whether to compress binary |
yname.row |
Logical value for whether to include a row displaying the
name of the |
text.label |
Character string with text to put after the |
quantiles |
Numeric value. If specified, table compares |
quantile.vals |
Logical value for whether labels for |
decimals |
Numeric value specifying number of decimal places for numbers other than p-values. |
formatp.list |
List of arguments to pass to |
n.headings |
Logical value for whether to display group sample sizes in parentheses in column headings. |
kable |
Logical value for whether to return a
|
kable
.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.