Description Usage Arguments Details Value Examples
View source: R/archived/tabmeans-2020-03-28.R View source: R/tabmeans.R
Creates a table comparing the mean 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 | tabmeans(
formula = NULL,
data = NULL,
x = NULL,
y = NULL,
columns = c("xgroups", "p"),
parenth = "sd",
sep.char = ", ",
variance = "unequal",
xlevels = NULL,
yname = NULL,
text.label = NULL,
quantiles = NULL,
quantile.vals = FALSE,
decimals = NULL,
formatp.list = NULL,
n.headings = TRUE,
kable = TRUE
)
|
formula |
Formula, e.g. |
data |
Data frame containing variables named in |
x |
Vector of values for the categorical |
y |
Vector of values for the continuous |
columns |
Character vector specifying what columns to include. Choices
for each element are |
parenth |
Character string specifying what statistic to display in
parentheses after the means. Choices are |
sep.char |
Character string with separator to place between lower and
upper bound of confidence intervals. Typically |
variance |
Character string specifying which version of the two-sample
t-test to use if |
xlevels |
Character vector with labels for the levels of |
yname |
Character string with a label for 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
|
A t-test is used to compare means if x
has two levels, and a one-way
analysis of variance is used if x
has more than two levels.
Observations with missing values for x
and/or y
are dropped.
kable
or character matrix.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.