如何为S4类创建一个槽类作为dist

时间:2014-12-19 11:50:25

标签: r distance s4

代码为,

setClass("tst",representation(mat="matrix", Distmat="dist"))

构建时,会出现警告,

Warning: undefined slot classes in definition of “tst”: Distmat(class “dist”)

如何将广告时段Distmat设为dist

更新 答案是马丁的评论

UPDATE2: 当BiocCheck这个包。看来:

the specification for S3 class “dist” in package ‘tst’ seems equivalent to   
one from package ‘graph : not turning on duplicate class definitions for this
class.

如果S4类中存在对象,则不建议使用setOldClass。任何解决方案?

0 个答案:

没有答案