How to donate letters to significant differences in R?

Hi all,

Its been a few days that I am struggling with a simple question and I really appreciate it if somebody can help me out.

I am trying to get the results of the ANOVA test in R with letters (a,b,c d) instead of asterisks, the same as what SPSS does. I tried to find some resources for that but none of them worked and a few of them were only developed for older versions of R.

My second question is how to donate those letters came from the ANOVA test to, for example, barplot or boxplots?

Bests, Shahram


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

Hi Shahram,
Check out the cld() (compact letter display) function in the emmeans package. There's more information about that in this past question.

Good luck!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.