当我Error: $ operator not defined for this S4 class
尝试ctree
从.party package
as.formula()
下面的例子:
#This works fine :
y <- ctree(formula = quotation ~ minute + temp, data=test[[1]], controls = ctree_control(mincriterion = 0.99))
#While this doesn't :
x <- "ctree(formula = quotation ~ minute + temp, data=test[[1]], controls = ctree_control(mincriterion = 0.99))"
y <- as.formula(x)
Error: $ operator not defined for this S4 class
我的最终目的是创建一个遍历列表test
以创建多棵树的函数。
任何想法 ?