问答详情
源自:3-6 Lattice绘图系统之实践

panel报错

 > 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

 

为什么会报错?我和老师做的一样

提问者:weibo_青柠不加冰_0 2016-04-15 11:17

个回答

  • Samtse
    2016-05-23 22:43:19

    多个变量要用c()函数括起来

    f <- factor(f, labels = c("Group1", "Group2"))