Teaching Data for Statistics and Data Science

Provides data sets for teaching statistics and data science courses. It includes a sample of data from John Edmund Kerrich's famous coinflip experiment. These are data that I use for teaching SOC 4015 / SOC 5050 at Saint Louis University (SLU). The package also contains an R Markdown template with the required formatting for assignments in my courses SOC 4015, SOC 4650, SOC 5050, and SOC 5650 at SLU.

Travis-CI BuildStatus AppVeyor BuildStatus DOI CRAN_Status_Badge

The goal of testDriveR is to provide data sets for teaching statistics and data science courses. This package includes a sample of data from John Edmund Kerrich’s famous coinflip experiment. These are data that I use for teaching SOC 4015 / SOC 5050 at Saint Louis University.

What is New in v0.5.1

The package now includes an R Markdown template for completing assignments. This is the required format for authoring R Markdown documents in my courses SOC 4015 / SOC 5050 and SOC 4650 / SOC 5650 at Saint Louis University. A quick overview is included below.


The easiest way to get testDriveR is to install it from CRAN:


You can also install the development version of testDriveR from Github with remotes:

# install.packages("remotes")

Current Data

The package currently contains five data tables:

  • auto17 - A data set containing model year 2017 vehicles for sale in the United States
  • childMortality - A data set containing childhood mortality time series data by country from UNICEF
  • gss14 - A data set containing a selection of variables related to work and education from the 2014 General Social Survey
  • gss14_simple - A simple version of gss14 without factors created and without missing data explicitly declared
  • kerrich - A data set containing 2000 trials of coin flips by John Edmund Kerrich


Once loaded, the data contained in testDriveR can be loaded into data frames in your global environment and then explored. For example, to load the auto17 data:

autoData <- auto17

Data Creation

If you are interested in the original data/code used to create the included data, you can find them at:

R Markdown Template

The package also includes a template that my students use for getting started with R based assignments. It can be accessed from within RStudio by going to File > New File > R Markdown... and then selecting SLU Sociology Assignments under Template:

The template includes YAML for generating both .nb.html and .md output, a pre-formatted date that updates each time the document is knit, and initial code blocks for loading dependencies and data.

Contributor Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


testDriveR 0.5.1

  • Address NOTES found on Winbuilder prior to CRAN submission

testDriveR 0.5.0

  • Add an R Markdown template for completing assignments in my courses.

testDriveR 0.4.0

  • Added a NEWS.md file to track changes to the package.
  • Switched GSS data to 2014, variables have remained the same
  • Updated package template including website, DESCRIPTION, README, LICENSE, and help files

testDriveR 0.3.0

  • adds a data set of childhood mortality data from UNICEF.

testDriveR 0.2.2

  • This release completes backend changes for now - Travis-CI and Appveyor integration has been expanded to included prior releases of R and the minimum version of R has been clarified.

testDriveR 0.2.1

  • This release covers backend changes, like integrating testDriveR with Travis CI and Appveyor.

testDriveR 0.2.0

  • Adds kerrich data to package!

testDriveR 0.1.2

  • This release fixes some inconsistencies in the gss16 and gss16_Miss data files.

testDriveR 0.1.1

  • This release adds R functions for loading the gss16 and gss16_Miss data, which were left out of the initial release.

testDriveR 0.1.0

  • This is the initial public release. It contains three data sets for teaching statistics and data science drawn from publicly available data from the Department of Transportation and NORC's General Social Survey.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.5.1 by Christopher Prener, 3 years ago


Report a bug at https://github.com/chris-prener/testDriveR/issues

Browse source code at https://github.com/cran/testDriveR

Authors: Christopher Prener [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Suggests dplyr, ggplot2, knitr, rmarkdown, testthat

See at CRAN