问题
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 plyr
from the source as suggested here but it didn't work as well, I still get the same error message.
回答1:
I updated the package "Rcpp" and now it is working for me. install.packages("Rcpp")
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/28966800/error-withcallinghandlers-crashing-r