我有這樣的數據幀:
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)
如何繪製避免刪除級別的子集數據框?
謝謝!
太容易了!謝謝你JT85 – FraNut