0

I'm not able to load the caret package in R studio due to the missing of /dependecy on the 'pbkrtest' package. However, the pbkrtest package is not available in R studio Version 0.99.879 (for mac). I updated R studio and all packages already. Here is the error message:

error message R Studio

Thanks!

milos.ai
  • 3,882
  • 7
  • 31
  • 33
Sner88
  • 1
  • 1
  • 6
  • 1
    For some reason, this error keeps popping up very regularly. The solutions vary, but what usually solves it is to update R. Could you verify that you are running R 3.2.3? [Maybe try installing manually as suggested in the comments in this question](http://stackoverflow.com/questions/34236629/unable-to-install-packagescaret-completely-in-r-version-3-2-3)? – slamballais Mar 31 '16 at 08:51
  • Thanks for your reply. I get the message 'This is R 3.2.2' However I downloaded the latest update from the R Studio website. Where can I find R studio 3.2.3? – Sner88 Mar 31 '16 at 08:54
  • Ha, I edited the comment a bit too late, it seems :) RStudio is just an interface for R. You need to go to the R website and download a newer version of R itself. Just Google `download R`. Apparently 3.2.4 is already available, but 3.2.3 would also work. Good luck! – slamballais Mar 31 '16 at 08:56
  • Thanks, I already downloaded R 3.2.4. however R studio recons that it is version 3.2.2, how can I change this? – Sner88 Mar 31 '16 at 08:57
  • It should detect it automatically. Restarting RStudio should be enough. If not, you may want to follow the top answer here: http://stackoverflow.com/questions/13656699/update-r-using-rstudio – slamballais Mar 31 '16 at 09:02
  • 2
    Good to hear it worked. I reported it as a duplicate of http://stackoverflow.com/questions/32186830/issues-installing-caret-package (which it is) in order to close the thread. – slamballais Mar 31 '16 at 09:04
  • Possible duplicate of [Update R using RStudio](https://stackoverflow.com/questions/13656699/update-r-using-rstudio) – Karolis Koncevičius Mar 11 '18 at 12:50

2 Answers2

0

If you can't or don't want to upgrade R for whatever reason (for example if you are running a SQL Server in-database R), a solution to this problem for me was to install the pbkrtest package from source directly (package version history). You can try different versions, but the one that worked for me was 0.4-4. You can install using the following command:

install.packages(path_to_file, lib=lib,repos = NULL, type="source")

where "path_to_file" is the location of your package with the package file name ending in .tar.gz likely and "lib" is the optional parameter for your R library -- if omitted the default will be used.

Dusan
  • 104
  • 1
  • 6
0
#This should work!

remove.packages("caret")
#this will completely uninstall caret from your device
install.packages("caret")