通过RStudio访问参考类的方法时引发警告

代码和警告:

tinyclass <- setRefClass("TinyClass", methods = list(doNothing=function(){}))
tc <- tinyclass()
tc$doNothing()
NULL
Warning messages:
1: In installClassMethod(value, self, field, selfEnv, thisClass) :
  method .objectPackage from class TinyClass was not processed into a class method until being installed.  Possible corruption of the methods in the class.
2: In installClassMethod(value, self, field, selfEnv, thisClass) :
  method .objectParent from class TinyClass was not processed into a class method until being installed.  Possible corruption of the methods in the class.

我也从setRefClass的帮助页面中提供的代码以及我尝试创建的任何其他类中获取此代码。 我在安装自己的R 3.2.2的Mac上可靠地获得它,并间歇性地运行在由IT部门安装的运行R 3.2.1的多个实际和虚拟Windows 64计算机上。

我正在使用RStudio 0.99.467。 我安装了以下软件包:数据集,图形,grDevices,方法,统计信息,实用程序。

新信息:

当我通过RStudio运行代码而不是通过本地R gui时,似乎会出现问题。

在RStudio中加载的软件包:

搜索()[1]“.GlobalEnv”“工具:rstudio”“package:stats”“package:graphics”“package:grDevices”“package:utils”
[7]“package:datasets”“package:methods”“Autoloads”“package:base”

在本机R中加载的软件包:

search()[1]“.GlobalEnv”“tools:RGUI”“package:stats”“package:graphics”“package:grDevices”“package:utils”
[7]“package:datasets”“package:methods”“Autoloads”“package:base”

思考? 谢谢

链接地址: http://www.djcxy.com/p/91603.html

上一篇: Warnings thrown when accessing methods of reference class through RStudio

下一篇: R package selective import and namespace