An exercise in creating, writing, documenting, and testing an R package.
This exercise involves building a package that contains R functions to read data from the US National Highway Traffic Safety Administration’s (NHTSA) Fatality Analysis Reporting System (FARS).
- Write R functions using
roxygen2
style comments - Write a
vignette
to include in the package usingknitr
and R Markdown (Rmd
) - Write tests written using
testthat
- Put package on GitHub
- Set up the repository so that the package can be checked and built on Travis and AppVeyor
The R package build will be a success if:
- The package contains the correct R file(s) under the
/R
directory - The package contains a
/man
directory with corresponding documentation files - The package contains a vignette which provides a meaningful description of the package and how it should be used
- The package has tests included in the
/tests
directory - The package has a NAMESPACE file
- A
README.md
file with appropriate badges - The build of this package passes on Travis and AppVeyor
- The build logs for this package on Travis and AppVeyor are free of any errors, warnings, or notes