knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Travis build status AppVeyor build status Coverage status
A collection of functions commonly used in the work of the biostatisticians. The goal of gtsummary is to make reporting of tabular analytic results simple, beautiful, and reproducible.

Installation

You can install the production version of gtsummary with:

install.packages("gtsummary")

and the development version with:

install.packages("remotes")
remotes::install_url("https://github.com/ddsjoberg/gtsummary-v0.1/archive/master.zip")

Examples

The vignettes/tutorials for the primary gtsummary functions have detailed examples and can be found at danieldsjoberg.com/gtsummary-v0.1. Each vignette is an Rmarkdown file (*.Rmd) and a copy of the files can be found here: https://github.com/ddsjoberg/gtsummary-v0.1/tree/master/vignettes.

Table 1

library(gtsummary)
fmt_table1(trial, by = "trt") %>% 
  add_comparison() %>% 
  bold_labels()

Regression Models

mod1 = glm(am ~ mpg + factor(cyl), mtcars, family = binomial(link = "logit"))
fmt_regression(
  mod1, exponentiate = TRUE, 
  label = list(`factor(cyl)` = "No. of Cylinders", mpg = "Miles per Gallon")
  )


ddsjoberg/gtsummary-v0.1 documentation built on June 4, 2019, 7:48 a.m.