I tried loading the library partyand received the following error:
Loading required package: zoo
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘lattice’ 0.20-24 is already loaded, but >= 0.20.27 is required
Error: package ‘zoo’ could not be loaded
Therefore, I decided to update all the packages in one session ( disconnect all packages while working in R ), including lattice, hoping that zoo, and then it partywill load correctly after the update lattice:
pkgs <- names( sessionInfo()$otherPkgs )
pkgs <- paste('package:', pkgs, sep = "")
lapply( pkgs , detach, character.only = TRUE, unload = TRUE)
update.packages(checkBuilt=TRUE, ask=FALSE,
repos="http://r-forge.r-project.org",
oldPkgs=c("lattice","zoo","party")
)
This did not work (during the same session and after restarting without preloading .RData):
> library(party)
Loading required package: zoo
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘lattice’ 0.20-24 is already loaded, but >= 0.20.27 is required
Error: package ‘zoo’ could not be loaded
According to How to update R2jags in R? , it’s better to just run install.packagesin the packages that I want to upgrade and then restart. And indeed, this did the trick.
, : update.packages, , , install.package ? R voodoo ? .