我正在尝试使用“不平衡” R软件包,并且出现了此类错误:
> library(imbalance)
> newSamples <- racog(iris0, numInstances = 40, burnin = 20, lag = 10, classAttr="Class")
有效!
> newSamples <- racog(iris0[,c("SepalLength","Class")], numInstances = 40, burnin = 20, lag = 10, classAttr="Class")
Error in check.data(x, allowed.types = c(discrete.data.types, continuous.data.types)) :
the data must be in a data frame.
这是个问题
iris0[,c("SepalLength","Class")]
和iris0
(如果是类型)有什么区别?