tableone
R package to create "Table 1", description of baseline characteristics with or without propensity score weighting
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
3 of 12 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Keywords
baseline-characteristics
cran
descriptive-statistics
r
statistics
Last synced: 11 months ago
·
JSON representation
Repository
R package to create "Table 1", description of baseline characteristics with or without propensity score weighting
Basic Info
- Host: GitHub
- Owner: kaz-yos
- Language: R
- Default Branch: master
- Homepage: https://cran.r-project.org/web/packages/tableone/index.html
- Size: 5.51 MB
Statistics
- Stars: 223
- Watchers: 18
- Forks: 43
- Open Issues: 58
- Releases: 26
Topics
baseline-characteristics
cran
descriptive-statistics
r
statistics
Created over 12 years ago
· Last pushed about 3 years ago
Metadata Files
Readme
README.Rmd
---
output: github_document
---
```{r, message = FALSE, tidy = FALSE, echo = F}
## knitr configuration: https://yihui.name/knitr/options#chunk_options
library(knitr)
showMessage <- FALSE
showWarning <- TRUE
set_alias(w = "fig.width", h = "fig.height", res = "results")
opts_chunk$set(comment = "##", error= TRUE, warning = showWarning, message = showMessage,
tidy = FALSE, cache = FALSE, echo = TRUE,
fig.width = 7, fig.height = 7,
fig.path = "man/figures")
## for rgl
## knit_hooks$set(rgl = hook_rgl, webgl = hook_webgl)
## for animation
opts_knit$set(animation.fun = hook_ffmpeg_html)
## R configuration
options(width = 116, scipen = 5)
```
# tableone
[](https://github.com/kaz-yos/tableone/actions)
[](https://www.r-pkg.org/pkg/tableone)
[](https://www.r-pkg.org/pkg/tableone)
**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

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.
```{r}
## Load package
library(tableone)
## Load data
data(pbc, package = "survival")
# drop ID from variable list
vars <- names(pbc)[-1]
## Create Table 1 stratified by trt (can add more stratifying variables)
tableOne <- CreateTableOne(vars = vars, strata = c("trt"), data = pbc,
factorVars = c("status","edema","stage"))
## Specifying nonnormal variables will show the variables appropriately,
## and show nonparametric test p-values. Specify variables in the exact
## argument to obtain the exact test p-values.
print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"),
exact = c("status","stage"), smd = TRUE,
formatOptions = list(big.mark = ","))
```
# 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.
```{r, eval = FALSE}
## 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!
- Alexander Bartel [ndevln](https://github.com/ndevln)
- Jonathan J Chipman [chipmanj](https://github.com/chipmanj)
- Justin Bohn [jmb01](https://github.com/jmb01)
- Lucy D'Agostino McGowan [LucyMcGowan](https://github.com/LucyMcGowan)
- Malcolm Barrett [malcolmbarrett](https://github.com/malcolmbarrett)
- Rune Haubo B Christensen [runehaubo](https://github.com/runehaubo)
- [gbouzill](https://github.com/gbouzill)
# Similar or complementary projects
There are multiple similar or complementary projects of interest.
- DescTools: Tools for Descriptive Statistics. https://cran.r-project.org/web/packages/DescTools/index.html
- Gmisc: Descriptive Statistics, Transition Plots, and More. https://cran.r-project.org/web/packages/Gmisc/
- Hmisc (summary.formula): Advanced table making and many more. https://github.com/harrelfe/Hmisc/
- arsenal: An Arsenal of 'R' Functions for Large-Scale Statistical Summaries. https://github.com/eheinzen/arsenal
- atable: Create Tables for Reporting Clinical Trials. https://github.com/arminstroebel/atable
- compareGroups: Descriptive Analysis by Groups. http://www.comparegroups.eu
- expss: Tables with Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics. https://github.com/gdemin/expss
- finalfit: Quickly Create Elegant Regression Results Tables and Plots when Modelling. https://finalfit.org/index.html
- framework for easily create tables for reporting: framework for easily create tables for reporting. https://davidgohel.github.io/flextable/
- furniture: Furniture for Quantitative Scientists. https://cran.r-project.org/web/packages/furniture/
- gtsummary: Presentation-Ready Data Summary and Analytic Result Tables. https://CRAN.R-project.org/package=gtsummary
- htmlTable: An R package for generating advanced tables. https://github.com/gforge/htmlTable
- kableExtra: Construct Complex Table with 'kable' and Pipe Syntax. https://github.com/haozhu233/kableExtra
- pander: An R Pandoc Writer. https://rapporter.github.io/pander/
- pixiedust: Format models for console and to markdown, HTML, and LaTeX. https://github.com/nutterb/pixiedust
- qwraps2: quickly placing data summaries and formatted regression results into .Rnw or .Rmd files. https://github.com/dewittpe/qwraps2/
- stargazer: Well-Formatted Regression and Summary Statistics Tables. https://cran.r-project.org/web/packages/stargazer/index.html
- tab: Functions for Creating Summary Tables for Statistical Reports. https://cran.r-project.org/package=tab
- table1: Tables of Descriptive Statistics in HTML. https://github.com/benjaminrich/table1
- table1xls: Exports Reproducible Summary Tables to Multi-Tab Spreadsheet Files. https://cran.r-project.org/web/packages/table1xls/index.html
- xtable: Export Tables to LaTeX or HTML. https://cran.r-project.org/web/packages/xtable/index.html
- (Python) tableone: Create "Table 1" for research papers in Python. https://github.com/tompollard/tableone
Owner
- Name: Kazuki Yoshida
- Login: kaz-yos
- Kind: user
- Location: Boston, MA, USA
- Website: https://www.linkedin.com/in/kazyos/
- Twitter: kaz_yos
- Repositories: 97
- Profile: https://github.com/kaz-yos
Father in Training | Rheumatology & Drug Safety/Efficacy & Clinical Research
GitHub Events
Total
- Watch event: 12
- Issue comment event: 1
- Pull request event: 2
- Fork event: 3
Last Year
- Watch event: 12
- Issue comment event: 1
- Pull request event: 2
- Fork event: 3
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| kaz-yos | k****a@m****u | 528 |
| kaz-yos | k****y@m****m | 264 |
| Alexander Bartel | g****b@n****g | 25 |
| Malcolm Barrett | m****t@g****m | 2 |
| Lucy | l****n@v****u | 2 |
| tszberkowitz | 6****z | 1 |
| gbouzill | 3****l | 1 |
| ZWael | z****s@g****m | 1 |
| Jonathan Chipman | j****n@v****u | 1 |
| Eric Leung | e****c@e****m | 1 |
| Agustin Calatroni | a****i@g****m | 1 |
| user | n****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 85
- Total pull requests: 22
- Average time to close issues: about 1 year
- Average time to close pull requests: 12 days
- Total issue authors: 73
- Total pull request authors: 14
- Average comments per issue: 1.89
- Average comments per pull request: 2.32
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: about 2 hours
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- eribul (3)
- DavisBrian (2)
- SophiaJia (2)
- ghost (2)
- Breal76 (2)
- amysheep (2)
- EddieItelman (2)
- MichaelChirico (2)
- stjeandenise (2)
- mikedolanfliss (2)
- tjebo (2)
- xinkai-zhou (1)
- RenePosma (1)
- iadli100 (1)
- r2dliu (1)
Pull Request Authors
- ndevln (5)
- ZWael (2)
- chipmanj (2)
- ghost (2)
- chenx23 (2)
- zimolzak (1)
- malcolmbarrett (1)
- agstn (1)
- runehaubo (1)
- gbouzill (1)
- erictleung (1)
- LucyMcGowan (1)
- tszberkowitz (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels
enhancement (1)
Packages
- Total packages: 3
-
Total downloads:
- cran 17,441 last-month
- Total docker downloads: 21,773
-
Total dependent packages: 13
(may contain duplicates) -
Total dependent repositories: 21
(may contain duplicates) - Total versions: 37
- Total maintainers: 1
proxy.golang.org: github.com/kaz-yos/tableone
- Documentation: https://pkg.go.dev/github.com/kaz-yos/tableone#section-documentation
-
Latest release: v0.5.0
published about 12 years ago
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced:
11 months ago
cran.r-project.org: tableone
Create 'Table 1' to Describe Baseline Characteristics with or without Propensity Score Weights
- Homepage: https://github.com/kaz-yos/tableone
- Documentation: http://cran.r-project.org/web/packages/tableone/tableone.pdf
- License: GPL-2
-
Latest release: 0.13.2
published over 4 years ago
Rankings
Forks count: 1.8%
Stargazers count: 2.1%
Downloads: 3.6%
Dependent packages count: 4.4%
Dependent repos count: 6.0%
Average: 7.1%
Docker downloads count: 24.8%
Maintainers (1)
Last synced:
11 months ago
conda-forge.org: r-tableone
- Homepage: https://github.com/kaz-yos/tableone
- License: GPL-2.0-only
-
Latest release: 0.13.2
published almost 4 years ago
Rankings
Stargazers count: 24.7%
Forks count: 25.6%
Average: 33.9%
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Last synced:
11 months ago
Dependencies
DESCRIPTION
cran
- MASS * imports
- e1071 * imports
- gmodels * imports
- labelled * imports
- nlme * imports
- survey * imports
- zoo * imports
- Matching * suggests
- Matrix * suggests
- geepack * suggests
- ggplot2 * suggests
- knitr * suggests
- lme4 * suggests
- lmerTest * suggests
- reshape2 * suggests
- rmarkdown * suggests
- survival * suggests
- testthat * suggests