custom.summarize | R Documentation |
Output summary table split by a categorical variable
custom.summarize(
df,
vars,
facvar = NULL,
statscol = T,
test_type = "wilcox",
sig.digits = 2
)
df |
data frame |
vars |
Named vector. Names are variables to summarize, values are human readable versions. |
facvar |
Factor variable defining exactly two groups. |
statscol |
Include statistical test of location difference between two groups. |
sig.digits |
The number of signficant digits for the output. |
A data frame with the summary stats that can be printed with kable
data(mtcars)
vars = c(mpg = 'miles per gallon', hp = 'horse power')
custom.summarize(mtcars, vars, facvar='am')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.