BuildingAnRPackage

Build Status

To-Dos

  1. Creating a Git Project
  2. Create a public repository
  3. Create a new project from RStudio in a local repository
  4. Add, Commit and Push the project folder to the remote repository
  5. devtools::use_mit_license adds a license to prevent warnings from checks later

  6. Package Core Functions

  7. Data is gathered from US National Highway Traffic Safety Administration
  8. The dataset of interest is provide by Fatality Analysis Reporting System (FARS)
  9. The official FTP site to download the data can be found here
  10. Downloaded data are placed in the same folder as the vignette to power the markdown
  11. Add fars_function.R along with the relevant roxygen2
  12. Learn roxygen tags via these links:
  13. devtools::document automatically generates the NAMESPACE in the root folder
  14. devtools::document also generates and the documentation files in the man folder

  15. Setting up testing framework

  16. devtools::use_testthat sets up testing infrastructure, creating tests/testthat.R and tests/testthat/
  17. devtools::use_test sets creates tests/testthat/test-.R and opens it for editing.
  18. devtools::test executes the tests
  19. Implement a test for make_filename.R functions

  20. Create a Vignette

  21. devtools::use_vignette creates a sub-directory and adds a vignette markdown document there for edit

  22. Check build

  23. devtools::check builds the package applying the same rigous as travis
  24. devtools::check_failures reads the check output folder and suggests possible areas of failure
  25. Check that R CMD check results has no errors
  26. Add Travis badge

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments



ZhangHaoquan/BuildingAnRPackage documentation built on May 8, 2019, 9:46 a.m.