-
Notifications
You must be signed in to change notification settings - Fork 6
Description
TL;DR: when creating a library, switchTo() will quit with an error if the manifest is not carefully checked (e.g., if asking for some weird version that does not exist). Any way to issue a message instead of throwing an error? Some sort of force or continue_on_error? It takes a while to download 100s of libraries only to have to start all over on error.
I'm trying to recreate an environment used on a Dev R server to train a model into a Prod server. I don't have root access to the latter's default repository and it's ruining my life. Hoping your package is the answer. Here's the code I run
library(switchr, lib.loc = lib_loc)
package_manifest_gh <- GithubManifest("hadley/secure",
"hadley/multidplyr",
"PhilippPro/vimp",
"gsk3/taRifx.geo")
#capture packages in current env (get about 410)
package_manifest <- libManifest(known_manifest = package_manifest_gh)
#clean up manifest df and versions
temp_df <- manifest_df(package_manifest)
manifest_df(package_manifest)<-temp_df[which(!is.na(temp_df$type)),]
temp_df <- versions_df(package_manifest)
versions_df(package_manifest)<-subset(temp_df, name %in% manifest_df(package_manifest)$name)
#create switch library
switchrBaseDir("/usr/share/R/library")
switchTo(paste0("NoShowPackage",format(Sys.Date(),"%m_%Y")),
seed = package_manifest)
and error I end up with. I just had to go in, manually edit the manifest for multidplyr and start over. Perhaps there's a smarter way to avoid redownloading by using lazyRepo(), but I couldn't find in documentation
downloaded 0 bytes
sh: svn: command not found
Error in innerFun(src, pkg, version = vers, dir = dir, param = param, :
Unable to locate the specified version of packagemultidplyr