compute_descriptive_table {AutoScore} | R Documentation |
Compute descriptive table (usually Table 1 in the medical literature) for the dataset.
compute_descriptive_table(df, ...)
df |
data frame after checking and fulfilling the requirement of AutoScore |
... |
additional parameters to pass to
|
No return value and the result of the descriptive analysis will be printed out.
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")