长话短说:
调用rxImport()在终端R会话中运行良好,但在使用RStudio时却失败,尽管使用的是R的相同安装。
设置:
我想使用RevoScaleR函数,比如rxImport(.)在Ubuntu上。我已经通过包管理器安装了RStudio和R。
我按照这里的说明安装了installed。一切似乎都正常,因为我可以在终点站运行:
/opt/microsoft/rclient/3.4.3/bin/R$ ./R
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
Microsoft R Open 3.4.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2018 Microsoft
Loading Microsoft R Client packages, version 3.4.3.0097.
Microsoft R Client limits some functions to available memory.
See: https://go.microsoft.com/fwlink/?linkid=799476 for information
about additional features.
...
Using the Intel MKL for parallel mathematical computing (using 2 cores).
Default CRAN mirror snapshot taken on 2018-01-01.
See: https://mran.microsoft.com/.
> R.home()
[1] "/opt/microsoft/rclient/3.4.3/runtime/R"
> rxImport()
Error in rxImport() : 'inData' must be specified.因此,函数在默认情况下是加载和可用的。现在,我告诉RStudio通过在~/.profile末尾添加以下内容来使用R的安装:
RSTUDIO_WHICH_R="/opt/microsoft/rclient/3.4.3/bin/R/R"错误:
当我运行rstudio时,我在IDE中得到一个R控制台,上面写着:
> R.home()
[1] "/opt/microsoft/rclient/3.4.3/runtime/R"
> rxImport()
Error in rxImport() : could not find function "rxImport"可能导致
我发现一些螺纹中有人抱怨MS包没有正确地处理~和工作目录(即在远程服务器上),但是setwd()并没有解决我的问题。
对于如何让RevoScaleR与RStudio协同工作,您有什么想法吗?提前谢谢。
发布于 2018-03-22 14:47:39
我从吉特布那里得到的一个答案是:https://github.com/rstudio/rstudio/issues/2455#issuecomment-375327109
试着设置
R_LIBS_SITE=/opt/microsoft/rclient/3.4.3/libraries/RServer在……里面
/opt/microsoft/rclient/3.4.3/runtime/R/etc/Renvironhttps://stackoverflow.com/questions/49179151
复制相似问题