> f <- factor(f,labels = "Group1","Group2")> xyplot(y~x | f,layout=c(2,1))Error in limits.and.aspect(default.prepanel, prepanel = prepanel, have.xlim = have.xlim, : need at least one panel
为什么会报错?我和老师做的一样
多个变量要用c()函数括起来
f <- factor(f, labels = c("Group1", "Group2"))