knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
This vignette focuses on the functions that generate tables and textual summaries.
summarydata()
provides descriptive statistics (mean, median, quartiles) for numeric variables.
summarydata( data = histopathology, vars = vars(Age, TumorSize) )
reportcat()
summarises categorical variables with counts and percentages.
reportcat( data = histopathology, vars = vars(Sex, Grade) )
Use crosstable()
to create cross tabulations with statistical tests. The group
argument defines the column variable.
crosstable( data = histopathology, vars = vars(Sex, Grade), group = "PreinvasiveComponent", sty = "nejm", excl = TRUE )
tableone()
creates publication-ready tables of baseline characteristics.
tableone( data = histopathology, vars = vars(Sex, PreinvasiveComponent, LVI, PNI, Grade, Age), sty = "t3", excl = TRUE )
These functions output results objects that contain tables which can be converted to data frames for further customisation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.