tabla2: Table 2

View source: R/tabla2.R

tabla2R Documentation

Table 2

Description

Creates two data frames (alocated in a list), one for continuous variables (with columns: variable, mean, sd, median and IQR), and another for categorical variables (with columns: n and percentage).

Usage

table2(data, digits = 2)


Arguments

data

Data to summarize, pay attention to column types.

digits

Number of decimals to round.

Value

A list with two data frames, first one containing the values for continuous variables and second one for categorical variables.

Examples

result <- table2(mtcars)
result
writexl::write_xlsx(result, "exported_table2.xlsx")

ValeriaRolle/auxfun documentation built on June 29, 2023, 5:28 p.m.