What is the most elegant way to split data and produce seasonal boxplots?

前端 未结 3 1022
无人及你
无人及你 2021-01-12 17:40

I want to produce seasonal boxplots for a lot of different time series. I hope that the code below clearly illustrates what I want to do.

My question is now, how to

3条回答
  •  执念已碎
    2021-01-12 18:20

    You are better off picking out the month names directly with the "%b" format and using an ordered factor and the formula interface for boxplot:

    DF$month <- factor(strftime(DF$Time,"%b"),levels=month.abb)
    boxplot(Data~month,DF)
    

    enter image description here

提交回复
热议问题