Do additional installed R packages, installed in our private gallery, persist through an upgrade?
Recently upgraded our DEV environment to 2019.1 and the R packages that we installed prior to upgrade were all still present in the /library folder.
Additional R packages are loaded to your private library (by default):
# Obtain the string of the package(s) to downloadpkgs <- '%Question.packages%'pkg2 <- trim.blanks(unlist(strsplit(pkgs, "\\,")))if (length(pkg2) > 1) { pkgs <- eval(parse(text = paste0("c('", paste(pkg2, collapse = "','"), "')")))}# Obtain the user specified directory (which may not be used)custom_path <- scan(what = character(), sep = "\n", nmax = 1)%Question.custom.path%# The set of possible repositories to userepos <- c("http://cran.revolutionanalytics.com", "http://cran.rstudio.com")# Select a particular repositoryrepo <- sample(repos, 1)# Get the path to the library folder, starting with the default case, then the# custom caseif ('%Question.default.dir%' == "True") { minor_ver <- strsplit(R.Version()$minor, "\\.")[[1]][1] R_ver <- paste(R.Version()$major, minor_ver, sep = ".") the_path <- paste0(normalizePath("~"), "\\R\\win-library\\", R_ver) # Create the user's personal folder if it doesn't already exist dir.create(the_path, recursive = TRUE, showWarnings = FALSE)} else { the_path <- gsub("\\\\", "/", custom_path, fixed = TRUE)}print(the_path)# Install the package to the user's private librarytranscript <- capture.output(install.packages(pkgs, lib = the_path, repos = repo))# Write out the results of trying to install the package(s)write.Alteryx(data.frame(Transcript = transcript))
What I've experienced is that if the library already exists, that you'll need to either DELETE or RENAME the Alteryx provided package (e.g. when you want a newer version). When you upgrade, you might have a need to modify the contents of the upgrade libraries.
Cheers,
Mark
I'm not sure I fully understand. This is the part I'm worried about, "When you upgrade, you might have a need to modify the contents of the upgrade libraries."
So when I install a completely new package, salesforcer for example. When I upgrade Alteryx server, is the salesforcer package maintained in the default directory (c:\program files\alteryx\R-3.4.4\library), or will it need to be installed again after the upgrade?