Adding new R packages

Adding new R packages to our repository

This has been automated with the g6tr_package_setup() function. But please recheck all the points manually.

  1. Create a new package inside the packages directory. Package folder should contain:
  • R, tests, vignettes, data (optional), inst (optional), pkgdown folders
  • DESCRIPTION, NEWS.md, .Rbuildignore files
  • .Rprofile file. This should be the same as for all other packages.
  • pkgdown/_pkgdown.yml file where functions and vignettes will be listed
  • Nice to have: README.md and a HexSticker inside man/figures
  1. Create an S3 folder for this package in docs.gradientmetrics.com

    • It needs to have at least register.html, signing.html and js/ files copied from another package
    • use _ instead of a . in the folder name
  2. Adjust the main pkgdown.yaml to include the new package.

  3. Extend GitHub Action builds executing R CMD CHECK for the new package

    • Copy Ubuntu workflow from the template workflow and put it to .github/workflows
    • Adjust names so that they reflect the new package (like g6tr.reports)
    • Adjust Linux dependency installation and R dependency installation steps in workflow with more specific instructions if needed; although sometimes the template code may be just enough
    • Extend main monorepo’s README.md with a new build checks/icons