Scans the current machine for every R installation it can find, across
multiple sources per platform, and returns a tidy data frame of results.
Usage
find_routes(search_paths = NULL)
Value
A data frame with one row per unique R installation and the
following columns:
version
Character. R version string, e.g. "4.4.1".
rscript_path
Character. Absolute path to the Rscript executable.
is_current
Logical. TRUE for the R session running courieR.
Arguments
search_paths
An optional character vector of additional paths to
search. Each element may be a directory containing bin/Rscript (or
bin/x64/Rscript.exe on Windows), or a direct path to an Rscript
executable.
Details
Detection sources by platform:
Windows
HKLM registry (SOFTWARE\R-core\R) — standard admin installs via
the CRAN Windows installer.
HKCU registry (SOFTWARE\R-core\R) — non-admin installs that
register under the current user hive only.
%ProgramFiles%\R — directory scan for admin installs not in the
registry.
%LOCALAPPDATA%\Programs\R — rig-managed and other user-local
installs.
%USERPROFILE%\Documents\R — installs placed in the user's
Documents folder.
rig (rig list) — any additional versions managed by rig that
were not found by path scanning.