用户,
我有这个数据框:
A<- c(10,2,4,5,3,5,98,65,36,65,6,100,70,54,25,23,22,30,15,23)
B<- c(1,0.1,0.5,0.8,0.2,0.9,3,1.2,5.6,3.5,15.9,10.2,5,5.1,7.1,5,6,10,4,8)
C<- c("a","a","a","a","a","a","b","b","b","b","c","c","c","c","d","d","d","d","d","d")
mydf<- data.frame(A,B,C)
我做了一个只保留“a”级别的子集。
subset<- subset(mydf, mydf$C=="a")
但是当我制作一个图(请参见图片)时,该图也显示了已删除的级别。
plot(B~ C, data=subset)
如何绘制子集数据框以避免删除级别?
谢谢!