0

I am trying to impute missing values using the mice package and I am getting an error

Error in matchindex(yhatobs, yhatmis, donors) : function 'Rcpp_precious_remove' not provided by package 'Rcpp'

I have tried to update the Rcpp ad even re-installed the package and I still haven't been able to solve the problem. I was also advised to redownload rtools but that did not solve the issue. I also faced the same problem while trying to install the SF package. I am using the Rcpp package version ‘1.0.5’.

Here is the whole error output from the mice imputation

6. matchindex(yhatobs, yhatmis, donors)
5. mice.impute.pmm(y = c(41L, 23L, 46L, 70L, 70L, 18L, 59L, 80L, 66L, 68L, 84L, 67L, 71L, 59L, 28L, 65L, 42L, 63L, 80L, 28L, 51L, 46L, 81L, 54L, 55L, 63L, 60L, 25L, 73L, 67L, 34L, 70L, 78L, 37L, 85L, 25L, 26L, 58L, 51L, 64L, 44L, 48L, 61L, 35L, 70L, 81L, 83L, ...
4. do.call(f, args = args)
3. sampler.univ(data = data, r = r, where = where, type = type, formula = ff, method = theMethod, yname = j, k = k, calltype = calltype, user = user, ignore = ignore, ...)
2. sampler(data, m, ignore, where, imp, blocks, method, visitSequence, predictorMatrix, formulas, blots, post, c(from, to), printFlag, ...)
1. mice(df[c(1, 12, 13)], m = 5, maxit = 50, meth = "pmm", seed = 500)
MrFlick
  • 195,160
  • 17
  • 277
  • 295
BoredGeek
  • 21
  • 2
  • 1
    The latest version of Rcpp on CRAN is 1.0.7. This should have been updated when you ran `install.packages("Rcpp")`. What is the output of that command? Were there any errors? If you update Rcpp the problem should go away. – MrFlick Aug 11 '21 at 04:03
  • @MrFlick Apparently I had issues with permissions with my windows R folder and couldn't update my packages. Solved the issue and appreciate your assistance. Thank you. – BoredGeek Aug 11 '21 at 04:36
  • I just tried loading the SF package and works like a charm. Thank you. – BoredGeek Aug 11 '21 at 04:36

0 Answers0