Installing and Loading R Packages for Reproducible Workflows
Set .libPaths
Setup for binary Linux repositories
Create a custom "available.packages" object
Needs VersionOnRepos
, versionSpec
and inequality
columns
Available and archived versions
The default cache directory for Require Cache
Path to (package) cache directory
Get the option for Require.cachePkgDir
Purge everything in the Require cache
Creates the directories, and adds version number
Check directory path
Pass through function for chooseCRANmirror
Clear Require Cache elements
Compare package versions
Only checks for deprecated libPath argument (singular)
GitHub package tools
Detach and unload all packages
Deals with missing libPaths arg, and takes first
GITHUB_PAT-aware and main
-master
-aware download from GitHub
Partial alternative (faster) to installed.packages
1st level --> create the .pkgEnv object in Require
3rd level for deps #############################################
3rd level for DESCRIPTIONFile
Extract info from package character strings
A helper function to get or set CRAN repos
The packages
argument may have up to 4 pieces of information for Git...
Parse a github package specification
Invert a 2-level list
Join a data.table with a Package
column to available.packages
Create link to file, falling back to making a copy if linking fails.
This converts master or main to HEAD for a git repo
Use message to print a clean square data structure
modifyList
for multiple lists
Normalize filepath
Convert numeric to character with padding
2nd level
Reverse package depends
2nd level
Like setdiff
, but takes into account names
Package dependencies when one or more packages removed
Take a snapshot of all the packages and version numbers
This environment variable "R_TESTS" is set during testing, and it poin...
Require: Installing and Loading R Packages for Reproducible Workflows
Require
options
Recursive function to remove .basePkgs
R versions
Setup a project library, cache, options
A list of R packages that should likely be installed from Source, not ...
split
for a data.table that keeps integrity of a column of lists of ...
download.files or install.packages in a separate process
Make a temporary (sub-)directory
Make a temporary subfile in a temporary (sub-)directory
Trim version number off a compound package name
Update installed packages with latest available versions
A single key function, 'Require' that makes rerun-tolerant versions of 'install.packages' and `require` for CRAN packages, packages no longer on CRAN (i.e., archived), specific versions of packages, and GitHub packages. This approach is developed to create reproducible workflows that are flexible and fast enough to use while in development stages, while able to build snapshots once a stable package collection is found. As with other functions in a reproducible workflow, this package emphasizes functions that return the same result whether it is the first or subsequent times running the function, with subsequent times being sufficiently fast that they can be run every time without undue waiting burden on the user or developer.
Useful links