tableone | R Documentation |
This function generates a "Table One", a descriptive summary table frequently used in clinicopathological research manuscripts. It supports multiple output styles for flexible formatting.
tableone(data, vars, sty = "t1", excl = FALSE)
data |
The input data as a data frame. |
vars |
A set of variable names from |
sty |
Specify the output style for the table. Each option uses a different package for formatting. |
excl |
Boolean option to exclude missing values (NA) from the analysis. Note: Exclusion may remove entire cases. |
A results object containing:
results$todo | a html | ||||
results$tablestyle1 | a preformatted | ||||
results$tablestyle2 | a html | ||||
results$tablestyle3 | a html | ||||
results$tablestyle4 | a html | ||||
# Example usage:
# data('histopathology')
# dat <- as.data.frame(histopathology)
# ClinicoPathDescriptives::tableone(
# data = dat,
# vars = vars(Sex, PreinvasiveComponent, LVI, PNI, Grade, Age),
# sty = "t3",
# excl = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.