V2.2.1 (submitted to CRAN on 2023-03-04)
Fixed bug that prevented running groundhog non-interactively when groundhog had never been run on a given machine before.

V2.2.0 (submitted to CRAN on 2023-01-25) - ** MRAN IS ENDING **
Main change: Because MRAN stopped archiving CRAN on 2023-01-31, groundhog does not attempt installing from MRAN for dates after 2023-01-31.

Note: MRAN will be shut down in July-2023, therefore, the next main release of groundhog, v2.3.0, to be released in April/May 2023, will not rely on MRAN at all. Instead, it will install binaries from GRAN, the groundhog R archive neighbor, a repository with all binaries available on CRAN since 2014. Binaries between 2014 and 2022 were copied from MRAN. New binaries are  obtained, daily, directly from CRAN, and saved to GRAN.

V2.1.0 (submitted to CRAN on 2022-10-02)
Intermediate: Fixed bug giving warning/error when loading a base package directly (e.g., groundhog.library('stats',date)

V2.0.1 (submitted to CRAN on 2022-07-26)

1. CRAN's daily check identified a bug with v2.0.0 that would prevent groundhog from loading, if other packages are being installed through parallel processing at the same time. Bug was fixed.
2. Removed hardcoded reference to a repos other than the repos as default in the R session
3. Add database updating if version in package folder is newer than local copy in groundhog folder  (this effectively updates the databases (e.g., cran.toc.rds) when installing a new version of groundhog).


V2.0.0 (submitted to CRAN on 2022-07-12)


  1. Install/load packages from GitHub & GitLab, not just CRAN
    example: groundhog.library('crsh/papaja','2022-01-01')
  2. Conflicts between version of a package groundhog attempts to load, and already loaded versions are now resolved instead of causing warnings and asking users to uninstall packages. Most notably, it is now easy to use groundhog with R Studio when making markdown files and notebooks (when 'knitr' and other packages are automatically loaded by R Studio). This also fixes the conflicts caused by R Studio when it automatically loads packages included in a script in this format pkg::
  3. The way in which #2 above is achieved involves a major change in architecture, worth mentioning as a separate major change. Packages loaded by groundhog are now copied to the default personal library to which packages more generally are installed with install.packages(). This ensures that even R scripts running on background (e.g., for parallel processing) will rely on the same version of packages as those loaded with groundhog within an R session. Because all packages are in the personal folder, when R Studio loads automatically a package when opening a script, it will load the version that groundhog will later use.
  4. The following syntax is now accepted:

    library('pkgC')   ",    date)

This makes it very easy for users who come across a script written without groundhog, to load all packages with groundhog

Other changes with v.2.0.0

  1. Option 'tolerate.R.version' is now required whenever not using the version of R that matches the requested date.
  2. When the MRAN server appears to be down, groundhog downloads source files from CRAN, without attempting to get binaries from MRAN first, for the next 5 hours. This can be over-ruled by running mran.is.up()
  3. Considerable speed increases when loading packages that were installed in previous sessions.
  4. Standardization of all messages shown to users into the same format.
  5. Messages shown when a package is not loaded require typing 'OK' to verify they have been read.
  6. Warning when different groundhog days are used within the same R session.
  7. If no default CRAN repository is set, one is set by groundhog.
  8. If no personal library is set, users are prompted to accept creating and using a default personal library (this is important for major change #2 above). The location of that default library is that identified by Sys.getenv("R_LIBS_USER")
  9. Packages are now loaded using the base library() command, instead of combining load() and attach() statements that were emulating that command. This makes groundhog.library() behave even more like library()
  10. More information given when RTools seems to be missing
  11. Shortened most messages that do not require user actions.
  12. Fixed bug where .libPaths() would not always return to its default upon finishing the groundhog.library() call
  13. Fixed bugs involving base and recommended packages
  14. Added checks for missing and erroneously formatted arguments in groundhog.library() calls
  15. Fixed bug that impeded using groundhog with R-3.3.x (it did work with 3.2.x and with 3.4.x, but not 3.3.x)
  16. Message '(In R Studio CMD/CTRL-SHIF-F10)' is only shown if using R studio.
  17. When choosing an MRAN date for downloading packages, most packages will be downloaded using the same date, typically the one entered in the groundhog.library() command

V1.5.0 (submitted to CRAN on 2021-09-07)


  1. Give warning when package name is provided without quotes.
  2. Re-organize back-end of groundhog.library(), it is now a loop calling on an external function instead of a nested within itself function (see new file groundhog.library.single())
  3. Switched method from 'internal' to 'libcurl'
  4. Fixed bug with tolerate.R.version
  5. Fixed bug which would prevent older Windows operating systems to install package binaries.
  6. Prevent a package that has been uninstalled twice to be re-installed twice when undoing all uninstalls via groundhog.

V1.4.0 (submitted to CRAN on 2021-05-03)


  1. Added capability of version-control for groundhog itself, users can load a desired version of groundhog with the  new function meta.groundhog(date).
  2. Added optional argument tolerate.R.version to groundhog.library(), allowing the use of an outdated version of R to load a more recent package version (e.g., load a package released in 2021, with R-3.6.3)
  3. Added capability of running groundhog on a not-yet-released version of R


  1. Prompts asking for user input now accept only pre-specified options, and prompts are repeated until one of these options is entered without executing subsequently submitted code until that occurs.
  2. Conflicts of different versions of the packages rstudioapi and testthat are no longer ignored by default (that is, these packages are no longer defaulted into ignore.deps() argument, because these packages have dependencies which in turn have dependencies with specified minimum version requirements which can prevent the loading of the necessary snowball).
  3. Fixed several bugs, most notably among these, changes to when the temporary .libPaths() modification takes place, the range of MRAN dates considered for binary install (used to include today's date - 2, switched to highest date in the locally available cran.toc.rds), and modified how the currently attached packages are listed when checking whether to attach, so that base packages are checked for as well.


The main change is handling the undocumented and automatic loading of packages by R Studio, which would cause difficult to circumvent package conflicts when loading via groundhog. Notably, R Studio (sometimes) loads packages that appear next to the :: operand in a script, even if the lines are not executed, which may make it impossible for a user to load the version of the package they desire.  Similarly, when working on .rmd files, R Studio loads 'knitr' and 'xfun' without notifying users. Version 1.3.2 of groundhog addresses this issue by:
a) Making conflicts with 'knitr' and 'xfun' generate a warning rather than an error, facilitating version control (for other packages) within .rmd files
b) Providing more information about causes and solutions of repetitive package version conflicts between what's loaded already and what users want to load.
c) Adding the option to uninstall from the local (non-groundhog) library, packages which R Studio is loading automatically. Upon encountering a repeated conflict (same groudhog.library() call leads to a conflict with a loaded package twice in a row), users are prompted to type 'uninstall' and all packages which are generating the conflict get uninstalled. A record of the uninstalled packages is made and saved locally to an .rds file; users can then reinstall at any time all packages uninstalled this way by running groundhog::reinstall.conflicts() which reads that .rds file and install packages listed in it.

Bug fixes:

  1. Dependencies labeled as "Depend" were not always being attached, now they are
  2. When installing a set of packages entered as a vector, an exit() command would interrupt additional code being run when the loading was sourced from a separate R script.


  1. Non-exported functions no longer are included in the documentation.
  2. Dropped experimental ResearchBox functions.



  1. Argument pkg became a vector in groundhog.library(pkg, date), allowing loading/installing many packages in a single library command:
    For example:
    groundhog.day <- '2021-01-01'
    pkgs <- c('pwr', 'rio', 'metafor')
    groundhog.library(pkgs, groundhog.day)
  2. Fixed bug preventing the groundhog folder path from including spaces.
    For example, this folder will be successfully work as a path in groundhog_1.2.0, but not groundhog_1.1.0
    set.groundhog.folder("c:/my folder")
  3. Added date validation, alerting users when the entered date is not in the accepted yyyy-mm-dd format.
  4. Fixed bug that a warning supposedly shown at most once every 24 hours was being shown every time
  5. Minor typos fixed in messages displayed on console.