V2.1.0 (submitted to CRAN on 2022-10-02)
Intermediate: Fixed bug giving warning/error when loading a base package directly (e.g.,
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)
- Install/load packages from GitHub & GitLab, not just CRAN
- 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
- 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.
- 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
- Option 'tolerate.R.version' is now required whenever not using the version of R that matches the requested date.
- 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
- Considerable speed increases when loading packages that were installed in previous sessions.
- Standardization of all messages shown to users into the same format.
- Messages shown when a package is not loaded require typing 'OK' to verify they have been read.
- Warning when different groundhog days are used within the same R session.
- If no default CRAN repository is set, one is set by groundhog.
- 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
- 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()
- More information given when RTools seems to be missing
- Shortened most messages that do not require user actions.
- Fixed bug where .libPaths() would not always return to its default upon finishing the groundhog.library() call
- Fixed bugs involving base and recommended packages
- Added checks for missing and erroneously formatted arguments in groundhog.library() calls
- 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)
- Message '(In R Studio CMD/CTRL-SHIF-F10)' is only shown if using R studio.
- 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)
- Give warning when package name is provided without quotes.
- 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())
- Switched method from 'internal' to 'libcurl'
- Fixed bug with tolerate.R.version
- Fixed bug which would prevent older Windows operating systems to install package binaries.
- 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)
- Added capability of version-control for groundhog itself, users can load a desired version of
groundhogwith the new function
- Added optional argument
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)
- Added capability of running
groundhogon a not-yet-released version of R
- 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.
- 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).
- 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.
- Dependencies labeled as "Depend" were not always being attached, now they are
- 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.
- Non-exported functions no longer are included in the documentation.
- Dropped experimental ResearchBox functions.
pkgbecame a vector in
groundhog.library(pkg, date),allowing loading/installing many packages in a single library command:
groundhog.day <- '2021-01-01'
pkgs <- c('pwr', 'rio', 'metafor')
- 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
- Added date validation, alerting users when the entered date is not in the accepted yyyy-mm-dd format.
- Fixed bug that a warning supposedly shown at most once every 24 hours was being shown every time
- Minor typos fixed in messages displayed on console.