Hello. I have R4.1.3 and RStudio-Server 2.22.12.0 running on a Linux (RHEL 8.7) server. I have changed the default package installation library location to somewhere else instead of the default /home/user/R/x86_64-pc-linux-gnu-library/4.1 path to save space on the /home mount point. Things have been working fine until recently I started to get the below error saying 'there is no packge called 'purrr' when trying to run some standard model code. (see below error ) Note, 'purrr' shows up in my installed packages. Also, I've tried to restart a new session, confirmed 'purrr' did not exist there in the new session, installed it, confirmed it was in my installed packages, attempted to run my code and then got the same error saying there is no package called 'purrr' . Very weird.
Challenge is – 'purrr 'shows up in my list of installed packages and loads when using library(purrr). Strange indeed, but the xgb macro run below is invoking purrr to do calculations and there seems to be a failure in loading “caret” as well? But caret is already loaded and has executed functions above the one above. Super strange because this code works everywhere else (local, on my PositCloud account, and home local). Does anyone know why this could be and what I can do to resolve the issue?
> xgb<-train(frac ~ .,
+ data=train,
+ method="xgbTree",
+ trControl=xgbTrControl,
+ tuneGrid=xgbGrid,
+ metric = "ROC",
+ objective = "binary:logistic")
Error in e$fun(obj, substitute(ex), parent.frame(), e$data) :
worker initialization failed: package or namespace load failed for ‘caret’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘purrr’