Skip to contents

Rebuilding the package

If altering the code, it is a good idea to regularly check that the R package is building properly and that all checks are OK. This can be done using:

devtools::document()
devtools::test()
devtools::check()
devtools::build()
devtools::install()

The website is automatically built and launched online when the GitHub repository is updated. However, sometimes it may be useful to build the website locally, this can be done using:

pkgdown::build_site()

See https://pkgdown.r-lib.org/index.html or https://github.com/r-lib/pkgdown for a detailed description of pkgdown (Wickham et al. 2025).

  • Vectors, matrices, and arrays in TMB: https://kaskr.github.io/adcomp/matrix_arrays_8cpp-example.html
  • Things you should not do in TMB: https://github.com/kaskr/adcomp/wiki/Things-you-should-NOT-do-in-TMB
  • The WHAM stock assessment model written in TMB: https://github.com/timjmiller/wham
  • How to maintain NEWS file: https://blog.r-hub.io/2020/05/08/pkg-news/
  • Kable tables: https://rstudio-pubs-static.s3.amazonaws.com/444395_76727eaf9c774fa8bf932bed16500a00.html
  • https://github.com/grantdadams/Rceattle/blob/dc19a923a30b92aac449eaa0612d49990c581d05/R/0-ceattle_equations_v11.R#L2370
  • https://github.com/pbs-assess/renewassess/tree/main/code/RTMB
  • https://github.com/calbertsen/RTMBconvenience

References

Wickham, Hadley, Jay Hesselberth, Maëlle Salmon, Olivier Roy, and Salim Brüggemann. 2025. Pkgdown: Make Static HTML Documentation for a Package. https://pkgdown.r-lib.org/.