在环境变量中设置 R_USER: D:\Program Files\Python37\Lib\site-packages\rpy2 之后,在python代码块中运行:
from rpy2.robjects import r, pandas2ri
Console中循环出现:
****found a symbol with attributes
****found a symbol with attributes
****found a symbol with attributes
****found a symbol with attributes
****found a symb
没有其他报错或警告信息。但是,在引擎关联的Python编译器里运行上述命令是可以正确执行的:
如若设置python.reticulate = FALSE是可以运行的(在引擎关联的Python编译器里),但是python.reticulate = TRUE,就出现上面所谓的无响应。
由于我第一次运行(在单个代码块内)时未保存脚本(无法在本地删除),导致每次重启RStudio时,整个RStudio都是无响应状态,界面无响应,此时CPU资源被RStudio的QtWebEngineProcess.exe占用大约50%,只能另开启一个RStudio进程,然后再从任务管理器结束的进程(任务管理器里并未显示无响应)。(如果能耐心等大约10分钟左右,RStudio会提示保存未响应的程序,保存后删除,下次启动RStudio时就可以正常了)。
但是,循环出现****found a symbol with attributes
的问题怎么解决呢?
无响应之前的 sessionInfo():
> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)China.936
[2] LC_CTYPE=Chinese (Simplified)China.936
[3] LC_MONETARY=Chinese (Simplified)China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)China.936
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.2 tools_3.5.2