[R-SIG-Mac] Question about stripchart

Richard M. Heiberger rmh @end|ng |rom temp|e@edu
Tue Feb 2 03:11:14 CET 2021


month.factor <- factor(month.name, month.name)


> month.name
 [1] "January"   "February"  "March"     "April"     "May"       "June"
 [7] "July"      "August"    "September" "October"   "November"  "December"
> class(month.name)
[1] "character"
> month.factor <- factor(month.name, month.name)
> levels(factor(month.name))
 [1] "April"     "August"    "December"  "February"  "January"   "July"
 [7] "June"      "March"     "May"       "November"  "October"   "September"
> levels(factor(month.factor))
 [1] "January"   "February"  "March"     "April"     "May"       "June"
 [7] "July"      "August"    "September" "October"   "November"  "December"

________________________________________
From: R-SIG-Mac <r-sig-mac-bounces using r-project.org> on behalf of Parkhurst, David F. <parkhurs using indiana.edu>
Sent: Monday, February 1, 2021 8:53 PM
To: r-sig-mac using r-project.org
Subject: [R-SIG-Mac] Question about stripchart

I have E. coli data (variable �conc�) for 73 dates over months from Apr through Dec (variable �monames�).  The data are in order from the April through December, and are in a data.frame titled "monamescon�.  When I run stripchart(conc~monames, data=monamescon, vert=TRUE), the months come out in alphabetical order along the x axis.  How can I get them to come out in time order instead?


        [[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list