desc_table: Descriptive statistics table

Description Usage Arguments Value Author(s) See Also

View source: R/desc_table.R

Description

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.

Usage

1
desc_table(data, group.var = NULL, cont.var = NULL, cat.var = NULL, paired = F)

Arguments

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?

Value

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

Author(s)

Matteo Miotto

See Also

desc_kable for descriptive kable


mmiots9/miotsdata documentation built on Dec. 21, 2021, 8:06 p.m.