5

I'm trying to do LMM using lme4, and this message pops up:

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

What should I do?

user3288202
  • 313
  • 1
  • 4
  • 14

1 Answers1

4

After a while, I got it.

1) Reinstall the latest version of Rcpp is the solution.

2) If you are not using lme4, but you also have this problem ("function 'dataptr' not provided by package 'Rcpp'") in combination with dyn.load(), it might be worth noting do not forget to include

library(Rcpp)

or

require(Rcpp)

on your code before

dyn.load("your_shared_lib.so")

Source: building_shared_libs_with_Rcpp

luis_js
  • 611
  • 5
  • 11
  • why are you doing `dyn.load()`? Is this a solution to the error in a different context? (You shouldn't need `dyn.load()` if you're using `lme4` ...) – Ben Bolker Apr 11 '14 at 19:51
  • But I ended up in this question using google looking for a solution for " function 'dataptr' not provided by package 'Rcpp'", So I guess more people will end up here also when building their shared libraries – luis_js Apr 11 '14 at 20:32
  • OK, then, it would be good to make that clearer in your answer. There was an answer from Florian Hartig that was converted to a comment because it was so short (see above) ... – Ben Bolker Apr 11 '14 at 22:23