It worked, thanks. Is there a way to put a trend line through the boxplots?
On Tue, Aug 9, 2011 at 10:58 AM, David Winsemius <dwinsem...@comcast.net>wrote: > > On Aug 9, 2011, at 9:46 AM, Fernando Andreacci wrote: > > I'm trying to make a monthly boxplot using this: >> >> boxplot(varmeasure ~ vardates) >> >> vardates = [1] 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 >> 10/1/2010 >> [8] 10/1/2010 10/1/2010 11/1/2010 11/1/2010 11/1/2010 11/1/2010 11/1/2010 >> .... >> >> varmeasure = [1] 0.0 26.0 0.2 -0.2 -1.2 -0.8 0.0 4.4 -0.6 >> -0.2 14.4 -0.2 >> [13] 4.8 4.0 2.8 3.2 3.8 3.2 -11.4 0.2 0.4 3.0 0.6 >> 6.2 >> .... >> >> >> they have same size. >> >> >> My problem is that R is ploting ordered by months and not by year and by >> months >> >> I'm getting 1/1/2011, 10/1/2010, 11/1/2010, 2/1/2011 >> >> How can I plot it in chronological order? >> > > By converting those character strings to dates. At the moment you seem to > believe that R has the ability to "know" that you want these strings to be > dates. > > ?as.Date > ?Dates > > -- > > David Winsemius, MD > West Hartford, CT > > -- Fernando Andreacci Biólogo Fone +55 47 9921 4015 +55 41 9921 3934 fandrea...@gmail.com [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.