Hi,
This answer is for obtaining the letters, not for adding them to ggplot
objects.
The package 'multcomp' provides functions for post-hoc tests (incl.
Tukey procedures) and for assigning those letters for pairwise
comparisons as well. You would need to create a model object first, pass
it to function glht() with arguments for multiple comparison procedures,
and then use this output for function cld() to obtain the letters.
See
http://www.inside-r.org/packages/cran/multcomp/docs/cld for examples.
Hope this helps, Tim
On 23.05.2016 11:11, Abdullah-Al Mamun wrote:
>
> Hi,
>
> I am struggling to get the letter display for tukey HSD test. I have
> 25 fish species and I would like to see the selenium level differences
> among them, after running tukey hsd I obtained sigginificant
> difference among them and some of them are not. Now I am struggling to
> get the letter display for them. For 4-5 species/treatment to do it
> manually but for 25 its really tough. I will appreciate you kind help
>
> Cheers
> Mamun
> ------------------------------------------------------------------------
> The University achieved an overall 5 stars in the QS World University
> Rankings 2015
> The University of Stirling is a charity registered in Scotland, number
> SC 011159.
> --
> --
> You received this message because you are subscribed to the ggplot2
> mailing list.
> Please provide a reproducible example:
>
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google
> Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
ggplot2+u...@googlegroups.com
> <mailto:
ggplot2+u...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
Tim Richter-Heitmann (M.Sc.)
PhD Candidate
International Max-Planck Research School for Marine Microbiology
University of Bremen
Microbial Ecophysiology Group (AG Friedrich)
FB02 - Biologie/Chemie
Leobener Straße (NW2 A2130)
D-28359 Bremen
Tel.: 0049(0)421 218-63062
Fax: 0049(0)421 218-63069