> Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()),
> versionCheck = vI[[j]]) : namespace ‘pbkrtest’ 0.4-2 is being
> loaded, but >= 0.4.4 is required
> Error: package or namespace load
> failed for ‘caret’
Caret was working fine until I tried to load Rcpp and it messed everything up.
I searched the answers for a similar problem with caret but the solutions posted did not seem to work on mine. I followed:
install.packages("caret", dependencies = TRUE)
But it did not work.
I would suggest you to check the R version. I updated the version to 3.5.1 and it works perfectly :)
Mac only – use updateR
Similar to installr, updateR is the package to help updating R on Mac OS.
The R code you will need is these 5 lines:
install.packages('devtools') #assuming it is not already installed
library(devtools)
install_github('andreacirilloac/updateR')
library(updateR)
updateR(admin_password = 'Admin user password')
I have faced this issue and tried many ways but followed r console about error thrown and started downloading packages one by one. steps noted down what i did for this. y r studio version is "R version 3.4.4"
First install.packages("caret"), install.packages("ggplot2"), install.packages("lattice"), install.packages("lava")..
then load library(ggplot2) then library(lattice) then library(lava) and then finally library(caret).
What i believe that caret have these packages dependency so once caret is installed ideally 'install.packages('caret', dependencies = TRUE)' should work but it was not working in my R version so i did the step as given above and it worked for me.
hope it may work if someone get this issue
I have the same problem with my
dynlm
package. I get the same error. But as R statespbkrtest
is required. This package isn't available under R 3.2.3. However you can download the package online, look a bit further on this site, the question is already asked on stackoverflow and they gave a site where you can find the packages. Then write the following code:In the first line, here I wrote the 3 dots you need to write the path to the file where you placed the pbkrtest-package.
I did try all the above mentioned ways to install and activate caret but none worked for me. finally what I did was to go to my drive location where R libraries are located. I removed a folder called "caret" and then in R studio I run "remove.packeges("caret")" to remove the caret package. then I reinstalled the package. install.packages("caret") library(caret) it worked for me.
I also faced the same problem with caret package and I could solve it as the following:
This worked for me!
Try install.packages('DEoptimR') and followed by install.packages("caret", dependencies = TRUE). I had the same issues. This command worked for me.