4.4 Creating a new package
- Call
usethis::create_package('yourPackageName')
- In RStudio, do File > New Project > New Directory > R Package. This ultimately calls usethis::create_package(), so really there’s just one way.
(I prefer to use RStudio - show using create_package from bash)
4.4.1 What does this do?
This creates your project structure for you:
R/
directoryDESCRIPTION
fileNAMESPACE
filepkgName.Rproj
file.Rbuildignore
&.gitignore
DO NOT use package.skeleton()
- it creates a package which will lead to errors when running R CMD build
and is not consistent with the devtools style of development.