Contributions are welcome from the community. Questions can be asked on the issues page of this repo. Before creating a new issue, please take a moment to search and make sure a similar issue does not already exist. If one does exist, you can comment (most simply even with just a :+1:) to show your support for that issue.
If you have direct contributions you would like considered for incorporation into the project you can fork this repository and submit a merge request for review.
Package Development 101
This section discusses the basic workflow of writing R packages. See this cheat sheet for more information.
Make an informatively named branch off of the main branch of this repo.
Make your desired change(s).
If writing a new function, make sure you thoroughly document the function using
roxygen2style. If you want this function to be exported with the package, add an@exporttab somewhere in the documentation (I prefer at the very end)If you’re changing a function that is already documented, make sure to update any aspects of the documentation your changes make outdated.
Write some tests to verify the function works/breaks when it should (e.g., throws an error when incorrect arguments are passed). See the testthat package documentation for information on writing good unit tests.
- Re-compile the documentation with
devtools::document(). This will print warnings/errors if there’s anything wrong with the documentation. This will update/create an.Rdfile in themanfolder.
- Bonus: re-build the package website with
pkgdown::build_site(). This will update the contents of thedocsfolder.
Re-build the package with
CTRL/CMD + SHIFT + B. Wait for the session to restart and the package to load.Run your function (in the console or wherever) and verify it works as expected.
Stage, commit, and push your changes to the
mortarGitLab repo. Open a merge request and add someone appropriate (e.g., the package maintainer) as a reviewer.