【发布时间】:2016-08-16 09:06:07
【问题描述】:
我最近将 RStudio 更新到 3.3.1,从那时起,当我使用 dplyr 运行以下代码时,R 告诉我“此应用程序已请求运行时以不寻常的方式终止它”。
max_trop <- df %>% group_by(record_id) %>% summarise(max= max(troponin, na.rm=TRUE))
如果我在做一些特别愚蠢的事情,谁能告诉我?它曾经工作得很好......
非常感谢
会话信息()
R version 3.3.1 (2016-06-21)Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:[1] LC_COLLATE=English_United Kingdom.1252
LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.5.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 R6_2.1.2 assertthat_0.1 DBI_0.4-1
tools_3.3.1 tibble_1.1 Rcpp_0.12.6
【问题讨论】:
-
发布你的 sessionInfo()
-
您确定 group_by() 和 summarise() 中指定的每个变量都存在于您的数据集中吗?当我错误输入使用 dplyr 的变量名时,我会导致 RStudio 崩溃。
-
3.3.1 是 R 版本。您使用的是最新版本的 Rstudio 吗? (应该不是问题,但是...)
-
分离然后重新安装 Rcpp 和 dplyr(先分离 dplyr,然后在重新安装时,先安装 Rcpp。如果这不起作用,请先尝试重新安装 dplyr。