0

I am trying to run a multilevel regression model when I get this error message in R

Error in initializePtr() : 
function 'Rcpp_precious_remove' not provided by package 'Rcpp'

This has only started happening today, before when I ran regression models this did not happen. I have tried reinstalling r but the error still persists. I am working with a large dataset of 300000 observations and 80 variables.

Phil
  • 7,287
  • 3
  • 36
  • 66
  • If you just stick the error string _into the search bar here at StackOverflow_ you thirtyfive hits. In short, it's a 'frequently asked question' and a duplicate, and those tend to get closed. Just upgrade the Rcpp package to be as current as the package you want to use, and which had been built against a newer version. – Dirk Eddelbuettel Mar 29 '22 at 17:16

1 Answers1

0

I suspect this is a version of this issue, namely that there is a mismatch in the stack of binary packages (Rcpp > RcppEigen > lme4) so that

the current situation means that lme4 fails unexpectedly for those installing it from CRAN as a binary and who expect the R package dependency system to ensure any dependencies are on the appropriate minimum versions.

Can you see whether

install.packages("Rcpp", type = "source")
install.packages("RcppEigen", type = "source")
install.packages("lme4", type = "source")

resolves the problem? This would depend on having development tools (compilers etc.) installed.

If @DirkEddelbuettel's comment above is correct, then you would only need install.packages("Rcpp") and not any of the rest of the machinery above.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453