1
我很高興在R中使用高級方式......所以對於無用的問題表示歉意! 我想創建一個類S4的對象,由3個插槽定義。事情是我無法設法將這些屬性創建爲列表。這裏是我的代碼:R - 創建一個帶有列表屬性的類
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
能否請你解釋一下如何創建與表劇情對象? Thx!