Liza Wood: Package creation using roxygen2
Liza shows us how to create an R package and write its documentation using Roxygen2
Live Code from presentation as separate script
Liza’s script shows how to make an R package for your favorite function(s) and distribute it via Github. The process, in brief:
- Use the
devtoolspackage to create a blank project directory from a template.
- Put each function into a script in the
Rfolder of the project directory.
- Decorate each function script with
- Run the
devtools::document()function to generate the package documentation.
- Fill in the template
- Create a Github repository and push the package to it.
Now anyone can load your package directly from Github and use the R functions you’ve created!