通过RStudio访问引用类的方法时抛出的警告

时间:2015-10-06 05:29:16

标签: r reference-class

代码和警告:

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中加载的包:

  

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

思考? 感谢

0 个答案:

没有答案