Error: withCallingHandlers crashing R

て烟熏妆下的殇ゞ 提交于 2019-12-10 00:55:21

问题


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.


回答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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!