R-packages

Updating packages on a drat repo

This is just a small note (mainly for myself but hopefully may be of some use to a few others!) to remind of how to update a package on a drat repo. Create the source file for the package you want to host on the drat repo using devtools::build(). Clone the drat repo hosting the package (in my case https://github.com/alan-y/drat). Use drat::insertPackage("package-source.tar.gz", getwd()) to add the package to the drat repo (getwd() works for me if my working directory is at the top level of the drat repo).