阅读背景:

对引用类方法使用“[[]]”表示法

来源:互联网 

While experimenting with the new reference classes in R I noticed some odd behaviour if you use the "[[ ]]" notation for methods (X[["doSomething"]] instead of X$doSomething). This notation works for fields, but I initially thought it wouldn't work for methods until I found that if you execute "class(X$doSomething)" you can then use "[[ ]]" afterwards. The simple example below illustrates the point.While experimenting with the new reference clas




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: