An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110824/40fd9b9e/attachment.pl>
Boxplot orders
4 messages · Phoebe Jekielek, Weidong Gu, David Winsemius +1 more
At default, factors (months) are alphabetically leveled. You can
explicitly re-level months
months<-factor(months,levels=c('Jan','Feb','Mar',...,'Dec'))
Then it should work.
Weidong Gu
On Wed, Aug 24, 2011 at 10:45 AM, Phoebe Jekielek <phoebejek at gmail.com> wrote:
Hi there, I have length data of an organism over the year and I want to make a boxplot. I get the boxplot just fine but the months are all out of order. In the data set they are in order from Jan-Dec...how can I fix this problem? Thanks so much in advance!! Phoebe ? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at 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.
On Aug 24, 2011, at 8:36 PM, Weidong Gu wrote:
At default, factors (months) are alphabetically leveled. You can
explicitly re-level months
months<-factor(months,levels=c('Jan','Feb','Mar',...,'Dec'))
> ?Constants > month.abb [1] "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec" No pi in the sky, that!
david. > Then it should work. > > Weidong Gu > > On Wed, Aug 24, 2011 at 10:45 AM, Phoebe Jekielek > <phoebejek at gmail.com> wrote: >> Hi there, >> >> I have length data of an organism over the year and I want to make a >> boxplot. I get the boxplot just fine but the months are all out of >> order. In >> the data set they are in order from Jan-Dec...how can I fix this >> problem? >> >> Thanks so much in advance!! >> >> Phoebe >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at 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. >> > > ______________________________________________ > R-help at 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. David Winsemius, MD West Hartford, CT
Hi
Hi there, I have length data of an organism over the year and I want to make a boxplot. I get the boxplot just fine but the months are all out of
order. In
the data set they are in order from Jan-Dec...how can I fix this
problem? Probably months are either character or factor values. If they are factor type you can easily change their ordering. factor(month.factor.variable, levels= vector of properly ordered months) Regards Petr
Thanks so much in advance!! Phoebe [[alternative HTML version deleted]]
______________________________________________ R-help at 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.