Creates a Table1 for Descriptive Statistics with tidyverse utils

devtools::install_github("cities-lab/tidytable1")

Usage

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
Name min median max Category freq % n
Sepal.Length 4.3 5.8 7.9 150
Sepal.Width 2 3 4.4 150
Petal.Length 1 4.35 6.9 150
Petal.Width 0.1 1.3 2.5 150
Species 150
setosa 50 33.33
versicolor 50 33.33
virginica 50 33.33
Name Label Source mean sd Category freq % #missing
Numeric Variables
mpg Miles/(US) gallon 1974 Motor Trend 20.09 6.03 0
disp Displacement (cu.in.) 230.72 123.94 0
hp Gross horsepower 146.69 68.56 0
drat Rear axle ratio 3.6 0.53 0
wt Weight (1000 lbs) 3.22 0.98 0
qsec 1/4 mile time 17.85 1.79 0
gear Number of forward gears 3.69 0.74 0
carb Number of carburetors 2.81 1.62 0
Categorical Variables
cyl Number of cylinders 0
4 11 34.38
6 7 21.88
8 14 43.75
vs V/S 0
0 18 56.25
1 14 43.75
am Transmission 0
automatic 19 59.38
manual 13 40.62

TODO

  • Enable stats by a grouping variable similar the behavior in tableone
  • Add hypothesis testing functionality

Build Status

Build Status