[R] boxplot with x-axis time

giuseppe calamita calamita_giuseppe at yahoo.it
Thu Mar 13 22:30:15 CET 2014


Dear R-users,
I want to plot boxplots of a single variable collected a few times during almost one year and I would like the x-axis to recognize the date-class of the variable.

I found some topics in the archive but:
- some questions were poorly posed (http://r.789695.n4.nabble.com/Boxplot-with-dates-td896401.html)  and so with no answer; 
- others, only address the topic of have the date on the x-axes ordered (http://r.789695.n4.nabble.com/Using-boxplot-in-a-daily-time-series-td843060.html#a843061);
- finally, another topic (http://r.789695.n4.nabble.com/Boxplot-position-on-X-axis-relative-to-it-s-value-td2196020.html)is quite close to what I need but it is not exactly the same.

I attached a simulated data.frame: it 2-column, the1-st are date and the 2-nd is the variable.
Here the code I use: 

pippo<- read.csv("pippo.csv")
pippo$date<- as.Date(pippo$date, format="%Y-%m-%d")

boxplot(V ~ date, data=pippo)

I would like that the x-axis look like in this plot
plot(V ~ date, data=pippo)
where the thick reproduce the right time of the year .

Thank you for your help


More information about the R-help mailing list