Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Greg Snow
801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of kurt_h...@nps.gov > Sent: Friday, January 28, 2011 2:54 PM > To: r-help@r-project.org > Subject: [R] Months in alphabetical order rather than chronologica

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread RICHARD M. HEIBERGER
You need to make your variable into a factor and specify the order. > mymonths <- c("December", "March") > factor(mymonths) [1] December March Levels: December March > factor(mymonths, levels=month.name) [1] December March 12 Levels: January February March April May June July August September Octo

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread David Winsemius
On Jan 28, 2011, at 4:53 PM, kurt_h...@nps.gov wrote: Greetings Though I have months in chronological order in my data table, the data were sampled every other month (i.e., February, April, June, August, October, December), every time I try to plot them (on the x-axis) they are plotte

Re: [R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Don McKenzie
Kurt You need to give us more information if you want good advice. For example, what sort of plot are you trying to make? A barplot? A time series? A reproducible example is always best. Please see the R-news posting guide for hints on a successful query. On Jan 28, 2011, at 1:53 PM, kur

[R] Months in alphabetical order rather than chronological order in graph

2011-01-28 Thread Kurt_Helf
Greetings Though I have months in chronological order in my data table, the data were sampled every other month (i.e., February, April, June, August, October, December), every time I try to plot them (on the x-axis) they are plotted in alphabetical order. What am I missing? Cheers Kurt