Compartmentalized
|
Documented
|
Extendible
|
Reproducible
|
Robust
|
Part 3, Sharing your package.
Sharing your package on GitHub
Once you have your package on GitHub, it is easy for people to install using
library(devtools)
install_github("youraccount/MyNewPackage")
For example to install the package on ‘RVerse-Tutorials’, you would use
install_github("RVerse-Tutorials/TestPackage")
Note, {remotes} is another option that you’ll see instead of {devtools}.
Making sure people use the latest version
You can create releases on GitHub and give people these installation instructions:
devtools::install_github("youraccount/MyNewPackage@*release")
Examples of real data packages
- SardineForecast A complex package with lots of different types of data.
- VRData This is a data repo that I am developing for NWFSC application.
Data package collaboration
In a team application, you’ll be dividing up the work.
- The package development. R coder and knows how to design a package.
- Data. Team members who add files to
data-raw
in whatever format your team uses.
- Documentation. Multiple team members might be involved in editing the files in the
R
directory. Note, in VRData the documentation headers are in data-raw
and I have code that processes that into the files in R
.
- Package maintainer. Not necessarily the package developer. This person makes sure releases are posted to GitHub.
NWFSC Math Bio Program