Need help with tableone?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

kaz-yos
160 Stars 36 Forks 914 Commits 38 Opened issues

Description

R package to create "Table 1", description of baseline characteristics with or without propensity score weighting

Services available

!
?

Need anything else?

Contributors list

# 288,403
R
cran
descrip...
repl
513 commits
# 488,022
R
htmlwid...
html5
descrip...
25 commits
# 140,431
R
TeX
ggplot-...
descrip...
2 commits
# 259,675
R
XML
google-...
descrip...
2 commits
# 668,565
apache-...
HTML
Shell
dplyr
1 commit
# 257
CSS
npm
freecod...
Node.js
1 commit
# 735,486
R
cran
descrip...
1 commit
# 742,497
R
cran
descrip...
1 commit

tableone

R-CMD-check CRAN RStudio mirror
downloads

An R package to create “Table 1”, description of baseline characteristics

Creates “Table 1”, i.e., description of baseline patient characteristics, which is essential in every medical research. Supports both continuous and categorical variables, as well as p-values and standardized mean differences. Weighted data are supported via the survey package.

tableone was inspired by descriptive statistics functions in Deducer , a Java-based GUI package by Ian Fellows. This package does not require GUI or Java, and intended for command-line users.

tableone in action

screencast

The code being executed can be found in the introduction vignette.

tableone code example

In this table, continuous and categorical variables can be placed in any order. The p-valeus are from exact tests for pre-specified variables. For nonnormal variables, it shows median and IQR instead of mean and SD, and p-values are from nonparametric tests. Numerically coded categorical variables can be transformed on the fly with factorVars. SMD stands for standardized mean differences. For weighted data, first created a svydesign object, and use the svyCreateTableOne() function. Most other options remain the same.

## Load package
library(tableone)

Error in library(tableone): there is no package called 'tableone'

Load data

data(pbc, package = "survival")

drop ID from variable list

vars

Installation

This version of tableone package for R is developmetal, and may not be available from the CRAN. You can install it using one of the following way.

Direct installation from github

You first need to install the devtools package to do the following. You can choose from the latest stable version and the latest development version.

## Install devtools (if you do not have it already)
install.packages("devtools")
## Install directly from github (develop branch)
devtools::install_github(repo = "kaz-yos/tableone", ref = "develop")

Using devtools may requires some preparation, please see the following link for information.

https://www.rstudio.com/projects/devtools/

Contributors

I would like to thank all the contributors!

Similar or complementary projects

There are multiple similar or complementary projects of interest.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.