我在新的Mac上安装了R(2.15.1)和RStudio(0.96.316).现在,每当我获取R脚本时,我都会收到以下警告消息.无论脚本是什么样的.在下一个案例中,我只使用了一只猫('Hello World)参数.
> source('~/Documents/R-Files/skript.r')
Hello World
Warnmeldung:
In eval.with.vis(ei, envir) :
.Internal(eval.with.vis) should not be used and will be removed soon
Run Code Online (Sandbox Code Playgroud)
我总是得到与代码中的行相同数量的警告.拥有四行输入的脚本会产生四个警告:
> source('~/Documents/R-Files/skript.r')
a Hello World
b Hello World
c Hello World
d Hello World
Warnmeldungen:
1: In eval.with.vis(ei, envir) :
.Internal(eval.with.vis) should not be used and will be removed soon
2: In eval.with.vis(ei, envir) :
.Internal(eval.with.vis) should not be used and will be removed soon
3: In eval.with.vis(ei, envir) :
.Internal(eval.with.vis) should not be used and will be removed soon
4: In eval.with.vis(ei, envir) :
.Internal(eval.with.vis) should not be used and will be removed soon
Run Code Online (Sandbox Code Playgroud)
但是,除了警告消息之外,R脚本工作正常.
我在R News上找到了以下信息:
- source()现在使用withVisible()而不是.Internal(eval.with.vis).这有时会略微改变追溯.
我认为这是我的问题的原因,但我不知道解决方案.如何禁用或避免警告?
小智 8
调试示例:"eval.with.vis"警告(此案例XML库,您的案例,任何库)
在2.15.1升级后的Mac上,我通过二进制搜索发现问题出在XML库中.
当我评论出这句话时:库("XML")警告就消失了.
我追溯到我使用CRAN的二进制XML库的事实.
当我从源重新安装库时(通过使用R gui App菜单选择"Packages and Data-> Package Installer"并使用左上方的下拉菜单并选择"CRAN(Sources)"),R app从源重建库.
在此之后,警告不再存在.
我建议您也确定哪个库正在使用"eval.with.vis"不推荐使用的代码,然后尝试从源代码重新编译它以确保您拥有最新版本.如果这不起作用,您可以更改源代码本身以使用当前版本"withVisible".
我浪费了三个小时来追踪这个错误.
如果有人知道重新安装所有库的自动方式,然后手动找到导致警告的那些库,然后从源代码半自动地重新安装有问题的库,这将是很好的.
祝你好运!