Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Grouping Time Series for Box Plot



> observer.time <- strptime(1:365, format="%j") # Generate dates
> observer.measure <- rnorm(365)
> ds <- data.frame(time = observer.time, measure = observer.measure)
> observer.months <- ordered(months(ds$time), 
    levels = c("January", "February", "March", "April", "May", "June", 
               "July", "August", "September", "October", "November", 
               "December"))
> boxplot(ds$measure ~ observer.months)

Todo: Convert this to R code to generate better quality plot.

Figure 32.3: An ordered monthly box plot.
Image rplot-boxplot-by-month



Copyright © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010