The function createPackageProject() aims to facilitate your package development by setting up a best practices template project.


The package projects get a basic R package structure, i.e. a DESCRIPTION file and an R/ directory, but by default a number of devtools functions are called to setup what we consider to be best practices.

Best practices include:

  • Using testthat to unit test your code
  • Using Travis-CI for testing your package in a clean environment
  • Using a code coverage platform to check how much of your code is tested by unit tests
  • Licensing the package under MIT
  • Creating package documentation (README, a vignette, a package doc, and a NEWS file)
  • Using Git source control
  • Developing the package subject to a Code of Conduct


Make your own

You could either make a wrapper around createPackageProject() to add additional setup steps, or you could make an alternative version of the function.

If you make your own, we’d be interested to hear about what you change/add and why. Please let us know on our GitHub Issues.