Re: [R] reorder x-axis

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Tue, 11 Mar 2008 10:45:13 -0400 (EDT)


Have a look at the posting guide (link at bottom of the post). :)

It is much easier to see what is happening if you submit an working example. At the moment we'd just be guessing at what you're doing.

If there is much data it would be much better to supply a small subset (that includes all alternatatives). A hundred lines of data usually is not needed. Five-ten lines of data probably is great.   

My guess at the moment is that you can rearrange the data.frame (if it is a data.frame) by using somehting like this (where aa simple is representing the data.frame)

aa <- c("HC", "RM190", "RM198" ,"RM202") vect <- c(1, 4, 3,2)
bb <- aa[vect]

> read.table("bug.txt", header=TRUE)
> plotMeans(bug$tot, bug$station, error.bars="se",
> main="Total")
>
> The plot is ordered in this way HC RM190 RM198
> RM202.
> I would like it to plot in this way HC RM202 RM198
> RM190.
>
> thanks
> Stephen
>
> Is this okay or would you like the data to be copied
> and pasted into
> the message body. I am trying to optimize my
> postings.
>
> --
> Let's not spend our time and resources thinking
> about things that are
> so little or so large that all they really do for us
> is puff us up and
> make us feel like gods. We are mammals, and have
> not exhausted the
> annoying little problems of being mammals.
>
> -K. Mullis
> > station month bas
> RM190 5 0.000
> RM190 7 1.563
> RM190 10 0.000
> RM190 11 0.000
> RM202 4 18.750
> RM202 5 18.750
> RM202 7 6.250
> RM202 10 4.800
> RM202 11 3.125
> RM198 4 18.750
> RM198 5 31.250
> RM198 7 3.125
> RM198 10 3.200
> RM198 11 12.500
> HC 4 0.000
> HC 5 0.000
> HC 7 0.000
> HC 10 0.000
> HC 11 0.000
> > ______________________________________________
> 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. Received on Tue 11 Mar 2008 - 14:54:18 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Mar 2008 - 15:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive