Re: [R] ggplot using scale_x_date gives Error in seq.int(r1$year, to$year, by)

2012-02-10 Thread Hadley Wickham
Hi Aidan, str is your friend: str(g) 'data.frame': 9 obs. of 3 variables: $ Date: chr 2011-12-23 2011-12-30 2012-01-06 2011-12-23 ... $ variable: Factor w/ 3 levels Price,Yield,..: 1 1 1 2 2 2 3 3 3 $ value : num 86.78 86.04 86.44 9.74 9.54 ... You haven't turned the Date

Re: [R] ggplot using scale_x_date gives Error in seq.int(r1$year, to$year, by)

2012-02-10 Thread Aidan Corcoran
Thanks Hadley, of course I should have spotted that. On Fri, Feb 10, 2012 at 12:46 PM, Hadley Wickham had...@rice.edu wrote: Hi Aidan, str is your friend: str(g) 'data.frame':   9 obs. of  3 variables:  $ Date    : chr  2011-12-23 2011-12-30 2012-01-06 2011-12-23 ...  $ variable: Factor

[R] ggplot using scale_x_date gives Error in seq.int(r1$year, to$year, by)

2012-01-06 Thread Aidan Corcoran
Dear all, ggplot gives me an error when trying to plot time series data using a date variable as the x axis. g-structure(list(Date = c(2011-12-23, 2011-12-30, 2012-01-06, 2011-12-23, 2011-12-30, 2012-01-06, 2011-12-23, 2011-12-30, 2012-01-06), variable = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L,