我一直在使用基于 plyr 的函数summarySE
and ddply
几个月没有任何问题。今天,当我在 R 中运行极其基本的例程时,出现了一些错误消息并导致 R 崩溃。
这是示例代码以及 R 崩溃之前出现的错误:
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
我读到了withCallingHandlers
是一个处理错误消息的函数,在 ddply 使用过程中它不应该给我任何错误。有谁知道如何修理它?
我已尝试重新安装plyr
但在这个问题上没有成功。
它在 14 小时前工作,因此这个错误对我来说根本没有意义......
谢谢!
编辑:我也尝试安装plyr
按照建议从源头开始here https://stackoverflow.com/questions/19933333/error-thrown-within-ddply-crashes-r但它不起作用,我仍然收到相同的错误消息。