14

I've been using plyr-based function summarySE and ddply for several months without any problem. Today when I ran my extremely basic routine in R some error message showed up and made R crash.

Here is an example code and the error I get before R crashes:

install.packages("plyr")
library(plyr)
results<-data.frame(Depth=rbind("Surface","Bottom"),DO=(runif(10,4,6)))
ddply(results, .(Depth), summarise,
mean = round(mean(DO), 2),
sd = round(sd(DO), 2),
min = min(DO),
max = max(DO))

Error in withCallingHandlers(tryCatch(evalq((function (i):
object '.rcpp_warning_recorder' not found

I read that withCallingHandlers is a function to deal with error messages, it shouldn't give me any error during ddply usage. Does anyone know how to fix it? I have tried reinstalling plyr but had no success on this issue.
It was working 14 hours ago, therefore this error makes no sense at all to me... Thanks!

Edit: I have also tried to install plyrfrom the source as suggested here but it didn't work as well, I still get the same error message.

Community
  • 1
  • 1
dudu
  • 528
  • 5
  • 13
  • Duplicate of [this question](http://stackoverflow.com/questions/19933333) - I had this exact error this morning, and the answer to the above question by yoplait worked for me – Luke Mar 10 '15 at 14:55
  • Thanks but it didn't work for me... – dudu Mar 10 '15 at 14:58
  • just noticed the error also applies for ggplot – dudu Mar 10 '15 at 15:16
  • 2
    I guess the problem was something related to `Rcpp` package. After reinstalling and trying to update it, ddply worked perfectly again today. – dudu Mar 11 '15 at 13:51

3 Answers3

17

I updated the package "Rcpp" and now it is working for me. install.packages("Rcpp")

Michael
  • 196
  • 2
  • 3
5

This looks to be an issue where the version of Rcpp on your system is older than the version running on CRAN. In this case upgrading the Rcpp package on your system via install.packages("Rcpp") (as others have mentioned) should solve the issue.

Ian Pylvainen
  • 301
  • 4
  • 5
1

Had the same error message whenever I called ggplot. If updating Rcpp doesn't work, update to R version 3.2.2 - that should solve it.

FarisZ
  • 11
  • 1