Description Usage Arguments Value Author(s) See Also
This function returns a descriptive statistics table for both categorical and continues variable for a 2-group dataset. It calculates also the p-value choosing the right statistical analysis.
1 | desc_table(data, group.var = NULL, cont.var = NULL, cat.var = NULL, paired = F)
|
data |
Dataframe to use |
group.var |
String of the grouping variable column name. The grouping variable MUST have only 2 different values |
cont.var |
Chr string (or vector) of the continuous variable/s column name to take into account |
cat.var |
Chr string (or vector) of the categorical variable/s column name to take into account |
paired |
Logical, are continuous variables paired? |
A table with the following columns: variable name - group_1 values (mean ± sd for continuous, n(%) for categorical) - group_2 values (mean ± sd for continuous, n(%) for categorical) - p-value - statistical method used
Matteo Miotto
desc_kable
for descriptive kable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.