An R package that provides an easy way of exporting the descriptive table 1 that is commonly used in articles to a Word document for easy editing and copying to the article.
The package is still under active development and has not been submitted to the CRAN yet.
You can install the TableOne package from GitHub repository as follows:
Installation using R package devtools:
install.packages("devtools")
devtools::install_github("agapiospanos/TableOne")
I will soon provide an excel file as a template for the input data format.
The basic function of this package has the following syntax:
library(TableOne)
tableone(
dichotomous = c('gender', 'hypertension'),
group.col.name = 'hyperglycemia',
control.value = 0,
treatment.value = 1,
import.col.names = c('age', 'gender', 'systbp', 'diastbp', 'hypertension'),
output.var.names = c('Age', 'Females', 'Systolic Blood Pressure', 'Diastolic Blood Pressure', 'Hypertension')
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.