Hi Max,
I see that "dotchart" does not have a "add" parameter.
For the fun of it, I added this feature, you can see the source code of the
new function here:
https://raw.github.com/talgalili/R-code-snippets/master/dotchart.with.add.r
With your example at the end of the file.

Here is a page showing the changes I've made to the original function, so
to enable this feature:
https://github.com/talgalili/R-code-snippets/commit/26b4104085808e6bcad49573ca2e060332467f39
This may not be the prettiest way, if someone on the list has ideas for
improvement, please let me know.

Cheers,
Tal

----------------Contact
Details:-------------------------------------------------------
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------




On Wed, May 9, 2012 at 10:25 AM, maxbre <mbres...@arpa.veneto.it> wrote:

> Given this example
>
> mean.values<-colMeans(VADeaths)
>
> mean.values<-apply(VADeaths, 2, mean)
> median.values<-apply(VADeaths, 2, median)
>
> dotchart(VADeaths, gdata=mean.values)
> dotchart(VADeaths, gdata=median.values)
>
> is it possible to “combine” a single dotchart showing both the mean and the
> median for each single group (with different plotting symbols)?
>
> …is it that possible with the use of the standard graphics or it is
> necessary (better) to use of a different package?
>
> Any example for this in my favourite (even almost always too much complex
> for myself) package lattice?
>
> thank you
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Dotchart-showing-mean-and-median-by-group-tp4619597.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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]]

______________________________________________
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.

Reply via email to