# Mean ± SD summary
stats_table(
vital_signs,
vars = c("temperature", "saturation"),
by = "supporto2",
statistic_type = "mean_sd"
)
# Both mean ± SD and median [Q1; Q3]
stats_table(
vital_signs,
statistic_type = "both",
include_na = FALSE
)
# Add p-value with default tests
stats_table(
vital_signs,
vars = c("temperature", "saturation"),
by = "supporto2",
pvalue = TRUE
)
# Add p-value and define method
stats_table(
vital_signs,
vars = c("temperature", "saturation"),
by = "supporto2",
pvalue = TRUE,
test_method = list(temperature ~ "t.test")
)
Run the code above in your browser using DataLab