Skip to content
Prev 132152 / 398502 Next

Using boxplot in a daily time series

From your post it is not clear how the data are organized. Supposing 
they are in a data frame you could use the ~ sintax.

For example:
timeColumn=as.Date("01-01-1970") + 1:500
timeSeries=rnorm(500)
df=data.frame(time=timeColumn, index=timeSeries)
boxplot(index~months(time), data=df)

Perhaps you would order the 12 boxes according to the months:
monthColumn=ordered(months(df$time), levels= c("January", "February", 
"March",
            "April", "May", "June", "July", "August", "September", 
"October", "November", "December"))
boxplot(df$index~monthColumn)

domenico
pedrosmarques at portugalmail.pt wrote: