switchr
Installing, Managing, and Switching Between Distinct Sets of Installed Packages
v0.14.8
·
Mar 21, 2023
·
Artistic-2.0
Description
Provides an abstraction for managing, installing, and switching between sets of installed R packages. This allows users to maintain multiple package libraries simultaneously, e.g. to maintain strict, package-version-specific reproducibility of many analyses, or work within a development/production release paradigm. Introduces a generalized package installation process which supports multiple repository and non-repository sources and tracks package provenance.
Downloads
404
Last 30 days
8341st
404
Last 90 days
404
Last year
CRAN Check Status
1
ERROR
2
NOTE
11
OK
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | NOTE |
| r-devel-linux-x86_64-debian-gcc | NOTE |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (14 non-OK)
NOTE
r-devel-linux-x86_64-debian-clang
CRAN incoming feasibility
Maintainer: ‘Gabriel Becker <gabembecker@gmail.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Gabriel",
family = "Becker",
role = c("aut", "cre"),
email = "gabembecker@gmail.com")
as necessary.
NOTE
r-devel-linux-x86_64-debian-gcc
CRAN incoming feasibility
Maintainer: ‘Gabriel Becker <gabembecker@gmail.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Gabriel",
family = "Becker",
role = c("aut", "cre"),
email = "gabembecker@gmail.com")
as necessary.
OK
r-devel-linux-x86_64-fedora-clang
*
OK
r-devel-linux-x86_64-fedora-gcc
*
OK
r-devel-macos-arm64
*
ERROR
r-devel-windows-x86_64
tests
Running 'winpath.R' [5s]
Running the tests in 'tests/winpath.R' failed.
Complete output:
> library(switchr)
> ## if(getOption("repos")["CRAN"] == "@CRAN@")
> ## chooseCRANmirror(ind=1L)
> graceful_inet(TRUE)
$on
[1] TRUE
$silent
[1] FALSE
> checkUrlRoundtrip = function(pth) {
+ pth = switchr:::normalizePath2(pth)
+ furl = switchr:::makeFileURL(pth)
+ pth2 = switchr:::fileFromFileURL(furl)
+ if(pth != pth2)
+ stop("Round trip result (", pth2, ") does not match original (", pth, ") when creating file URLs")
+ }
>
> ## regression test to ensure that the roundtrip
> ## between path and file url is working properly
> checkUrlRoundtrip(getwd())
> checkUrlRoundtrip(tempdir())
> if(switchr:::isWindows())
+ checkUrlRoundtrip("\\\\localhost\\c$")
>
> ## regreossion test to ensure that package dependencies
> ## are added to the dontunload list when a package
> ## is specified
> bef = switchrDontUnload()
> af = switchrDontUnload("knitr")
> stopifnot(all(tools::package_dependencies("knitr", recursive = TRUE)[[1]] %in% af))
>
>
> ## regression test for unnecessary (and expensive)
> ## lazy repo construction when install_packages
> ## is passed urls for existing repos (the default
> ## behavior).
> tmplib = tempdir()
> trace(lazyRepo, stop)
Tracing function "lazyRepo" in environment <namespace:switchr>
Warning: Tracing only in the namespace; to untrace you will need:
untrace("lazyRepo", where = getNamespace("switchr"))
[1] "lazyRepo"
attr(,"package")
[1] "switchr"
> install_packages("switchr", repos = defaultRepos(), lib = tmplib)
Error in rbind(avail1, avail2[new, ]) :
number of columns of matrices must match (see arg 2)
Calls: install_packages ... install_packages -> install_packages -> .install_packages -> rbind
Execution halted
OK
r-oldrel-macos-arm64
*
OK
r-oldrel-macos-x86_64
*
OK
r-oldrel-windows-x86_64
*
OK
r-patched-linux-x86_64
*
OK
r-release-linux-x86_64
*
OK
r-release-macos-arm64
*
OK
r-release-macos-x86_64
*
OK
r-release-windows-x86_64
*
Check History
ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
NOTE
r-devel-linux-x86_64-debian-clang
CRAN incoming feasibility
Maintainer: ‘Gabriel Becker <gabembecker@gmail.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Gabriel",
family = "Becker",
role = c("aut", "cre"),
email = "gabembecker@gmail.com")
as necessary.
NOTE
r-devel-linux-x86_64-debian-gcc
CRAN incoming feasibility
Maintainer: ‘Gabriel Becker <gabembecker@gmail.com>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Gabriel",
family = "Becker",
role = c("aut", "cre"),
email = "gabembecker@gmail.com")
as necessary.
ERROR
r-devel-windows-x86_64
tests
Running 'winpath.R' [5s]
Running the tests in 'tests/winpath.R' failed.
Complete output:
> library(switchr)
> ## if(getOption("repos")["CRAN"] == "@CRAN@")
> ## chooseCRANmirror(ind=1L)
> graceful_inet(TRUE)
$on
[1] TRUE
$silent
[1] FALSE
> checkUrlRoundtrip = function(pth) {
+ pth = switchr:::normalizePath2(pth)
+ furl = switchr:::makeFileURL(pth)
+ pth2 = switchr:::fileFromFileURL(furl)
+ if(pth != pth2)
+ stop("Round trip result
Dependency Network
Version History
new
0.14.8
Mar 9, 2026