我对以高级方式使用 R 非常陌生……所以对无用的问题表示歉意!我想创建一个由 3 个插槽定义的 S4 类对象。问题是我无法将这些属性创建为列表。这是我的代码:
test<-setClass("dblist",representation(df.list="list", df.para="list",df.coups="list"))
new("dblist",representation(df.list="list", df.para="list",df.coups="list"))
和我得到的错误:
Error in initialize(value, ...) : cannot use object of class “list” in new(): class
“dblistpgn” does not extend that class
你能解释一下如何用列表图创建一个对象吗?谢谢!