Learn R Programming

AutoScore (version 1.1.0)

compute_descriptive_table: AutoScore function: Descriptive Analysis

Description

Compute descriptive table (usually Table 1 in the medical literature) for the dataset.

Usage

compute_descriptive_table(df, ...)

Value

No return value and the result of the descriptive analysis will be printed out.

Arguments

df

data frame after checking and fulfilling the requirement of AutoScore

...

additional parameters to pass to print.TableOne and kable.

Examples

Run this code
data("sample_data")
names(sample_data)[names(sample_data) == "Mortality_inpatient"] <- "label"
compute_descriptive_table(sample_data)
# Report median and IQR (instead of default mean and SD) for Age, and add a
# caption to printed table:
compute_descriptive_table(sample_data, nonnormal = "Age",
                          caption = "Table 1. Patient characteristics")

Run the code above in your browser using DataLab