【发布时间】:2016-08-04 22:43:29
【问题描述】:
我有 R Studio(当然还有 R)并且打算使用 Rcpp 包。我使用的是 Windows 机器。
- 我安装了 R 工具。该文件夹位于 C:\Rtool
- 我在控制面板->系统->高级系统设置->环境变量中更改了我的 PATH,并添加了 2 个新的 PATH C:\Rtools\mingw_32\i686-w64-mingw32\bin 和 C:\Rtools\bin PATH 列表顶部的每一个
- 我重新启动了计算机
- 在 rstudio 中启动了一个新的 C++ 脚本
- 使用 library() 加载 rcpp 包
- 点击水平栏中的 Source 按钮运行预先存在的代码 (timesTwo)。
我收到一条错误消息
应用程序已请求运行时以不寻常的方式终止它。请联系应用程序的支持团队了解更多信息
还会弹出一个警告提示
R 会话中止。 R 遇到致命错误。会话已终止。
通过运行 library(rcpp) 和 sessionInfo() 我得到版本信息
R version 3.3.1 (2016-06-21)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_Malaysia.1252 LC_CTYPE=English_Malaysia.1252
[3] LC_MONETARY=English_Malaysia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Malaysia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_0.12.6
loaded via a namespace (and not attached):
[1] tools_3.3.1
谁能告诉我哪里出了问题,我该如何解决?
【问题讨论】:
-
请通过运行
library(Rcpp)和sessionInfo()提供版本信息。 -
@Coatless 谢谢。我刚刚添加了
-
另外,为什么在 64 位操作系统上使用 32 位版本的 R?
-
感谢完美。我不知道。
-
潜在问题是 R 3.3.x + RStudio 之间的交互不良,该问题已通过 RStudio 的最新预览版 (v0.99.1280) 得到解决。