Using groundhog with GitHub Packages

Currently, groundhog only does version control with CRAN packages, but you can use version-controlled packages from GitHub following the steps below. The step-by-step instructions use the package ‘papaja’ as an example.

Step 1. Load ‘devtools’ and ‘jtools’ to install the GitHub package and its dependencies

library('groundhog') = '2021-09-01'
pkgs <- c('devtools','jtools)


Step 2. Visit the URL for the GitHub package you want to install and find the release (i.e. ‘version’)  you want (if you don’t have a preference, use the most recent release, biggest number listed). The URL is simply the GiHub page with /releases at the end.

As of this writing the most recent release for our example papaja was v0.1.0.9997 so that’s the version we would install

Step 3. Install, without dependencies, that version of the GitHub package

devtools:install_github("",dependencies = FALSE)

Step 4.  Use jtools to obtain the list of all dependencies for that GitHub package

pkgs_for_papaja <- gtools::getDependencies('papaja')

Step 5 Install those dependencies with groundhog

groundhog.library(pkgs_for_papaja , 

Step 6. Load the GitHub package


If you are intimately familiar with the package in question, you can specify, instead of the release, the commit # you wish to install.
Modify Step 2 visiting and choose the commit you want.
Modify Step 3 by specifying that commit into the installation
devtools::install_github("",dependencies = FALSE)