df_table1: Adding Degrees of Freedom to table1

View source: R/df_table1.R

df_table1R Documentation

Adding Degrees of Freedom to table1

Description

This function allows you to add a column calculating degrees of freedom to the table1 function. The calculation is based on a one-way ANOVA for continuous variables and chi-squared for categorical variables.

Usage

df_table1(x, ...)

Arguments

x

This input is not necessary if used as an added function in the extra.cols argument in table1. The input will automatically be detected by the function.

Examples

data("sleep")

table1::table1(~ extra | group, data = sleep, extra.cols = c(`DF`= df_table1))


UKBiostatCIRCL/UK-Biostat-CIRCL documentation built on June 30, 2022, 4:42 a.m.