Hi:

Is this what you're after?

dotplot(reorder(category, -values, mean) ~values, data=testdot)

See ?reorder

HTH,
Dennis

On Wed, Dec 22, 2010 at 2:59 AM, e-letter <inpost@gmail.com> wrote:

> On 20/12/2010, e-letter <inpost@gmail.com> wrote:
> > On 18/12/2010, e-letter <inpost@gmail.com> wrote:
> >> On 18/12/2010, Peter Ehlers <ehlers@ucalgary.ca> wrote:
> >>> On 2010-12-18 07:50, e-letter wrote:
> >>>>> Ben Bolker
> >>>>> Sat, 18 Dec 2010 07:07:24 -0800
> >>>
> >>> [... snip ...]
> >>>
> >>>> I am trying to create a chart like this
> >>>> (http://www.b-eye-network.com/images/content/Fig4_3.jpg); so this is
> >>>> not possible using R?
> >>>
> >>> That looks an awful lot like what lattice's dotplot would
> >>> produce. So: have you tried dotplot() as Ben has suggested?
> >>>
> >>
> >
>
> A csv file is imported:
>
> > testdot
>  category values
> 1        a     10
> 2        b     44
> 3        c     51
> 4        d     65
> 5        a     27
> 6        b     64
> 7        c     71
> 8        d     49
>
> A dotplot is produced with the command:
>
> dotplot(category~values,data=testdot)
>
> The csv file is adjusted to move the values of 'a':
>
> > testdot
>  category values
> 1        b     44
> 2        c     51
> 3        d     65
> 4        a     10
> 5        b     64
> 6        c     71
> 7        d     49
> 8        a     27
>
> Why  does the order of the categories not change from d,c,b,a to
> a,d,c,b (descending from top)?
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

