I am making an R package using RStudio. I am comfortable using the buttons on the Build panel. I have a script that I would like to run each time I Build & Reload or Clean and Rebuild. I'd like to write a function that runs my script and then executes the devtools commands associated with one of those buttons, but I am having trouble finding documentation of the correspondence between those buttons and devtools commands. The buttons are as follows:
- Build & Reload
- Check
- Load All
- Clean and Rebuild
- Test Package
- Check Package
- Build Source Package
- Build Binary Package
For each of the items in that list, what devtools R code would I run to cause the exact same behavior?