dunn.letters: Plotting helper function to add letters indicating...

View source: R/dunn.letters.R

dunn.lettersR Documentation

Plotting helper function to add letters indicating statistically similar parings.

Description

Plotting helper function to add letters indicating statistically similar parings.

Usage

dunn.letters(levels, x, y, labels, col2 = col2, cex2 = cex2)

Arguments

levels

The number of groups

x

a list of x variables

y

a list of y variables

labels

what text do you want to include

col2

color of the text label

cex2

size of label

Value

Helper function to add letters indicating statitcal significance.

Note

Use in combination with dunn.test::dunn.test() and rcompanion::cldList()

Examples

## Not run: 
library(dunn.test)
library(rcompanion)

set.seed(123)
data=data.frame(group=c(rep("alpha",5),rep("beta",5),rep("delta",5)),value=c(runif(5,max=2),runif(5,min=4,max=10),runif(5,min=12,max=30)))

DT=with(data,dunn.test(value,group))
rslt=toupper(cldList(P.adjusted ~ comparison,data=DT,threshold = 0.05)$Letter)
boxplot(value~group,data,ylim=c(0,40))
dunn.letters(3,1:3,c(2,10,30),rslt,"red",1)

## End(Not run)

SwampThingPaul/AnalystHelper documentation built on March 29, 2024, 6:41 p.m.