Problem loading Caret

Whenever I try to install and load the caret library, I get an error message saying:
Error: package or namespace load failed for ‘caret’ in inDL(x, as.logical(local), as.logical(now), ...):
unable to load shared object '/Documents/R/win-library/4.0/Rcpp/libs/x64/Rcpp.dll':
LoadLibrary failure: The specified procedure could not be found.
In addition: Warning message:
package ‘caret’ was built under R version 4.0.2

I tried many things such as reinstalling R for Windows 4.0, reinstalled all the required packages , tried updating the packages and nothing seems to work.

update.packages(ask=FALSE, checkBuilt=TRUE)
install.packages("caret", dependencies = TRUE)

Now I also get an error popup saying that the entry point for procedure EXTPTR_PTR cannot be found in my library \R\win-library\4.0\Rcpp\libs\x64\Rcpp.dll.

Can someone help please???

The short answer is the current CRAN release of Rcpp (1.0.5) is incompatible with R 4.0.0. See ( for some details).

This is fixed in the development version of Rcpp (but not currently submitted to CRAN), or is also fixed if you use R 4.0.2.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.