パッケージを使用してggplot2
、種の豊富さの積み上げ領域をプロットしています。
私のコード:
#Aggragate 2 column
x=IBTS[,3:4]
Datehour=paste(IBTS$Date.,IBTS$Time.)
Date<-strptime(Datehour,"%d/%m/%Y %H:%M")
#Add a new column with the date
IBTS$Date
IBTS<-cbind(IBTS,Date)
#Plotting the data
p<-ggplot(IBTS,aes(x=Date,y=Number.of.Particles.))
p+geom_area(aes(fill=Selection.set.),position="stack")+
theme_bw()+ scale_fill_brewer(palette="Blues")
このプロットを取得します。
簡単な質問があります。30、データフレームに NA 値がありますが、これらの値はプロットでは考慮されません。
誰にもアイデアはありますか?