4.3 Naming your package
See the naming convention used for existing packages: List of packages on CRAN
Laws:
- The name can only consist of letters, numbers, and periods, i.e., ..
- It must start with a letter.
- It cannot end with a period.
(no underscores _
or hyphens -
)
Recommendations:
- No periods.
- Easy to Google.
- Avoid confusion with an existing R package (not on CRAN/Bioconductor/GitHub) or well known package from other language (numpy, pandas)
- All lower case if possible.
- Abbreviations to reduce name length (brms = Bayesian Regression Models using Stan)
- Adding in capital R’s for fun.
- Not getting sued (
facebookRfacebook,DropboxRDrop,appleappler)
Here is a fun blog post on naming R packages by Nick Tierney. Also recommend checking out his package greta
which is really cool and has useful example of using python (to access tensorflow) from R in a package. He also has a guide on renaming an R package