tukey_to_matrix: Create Matrix From TukeyHSD Output

View source: R/helpful_functions.R

tukey_to_matrixR Documentation

Create Matrix From TukeyHSD Output

Description

The function will create a rootdetectR compatible Matrix from TukeyHSD output. The returened matrix can be used to retrieve plotting letters with the get_sig_letters function from rootdetectR.

Usage

tukey_to_matrix(tukeyHSD_output)

Arguments

tukeyHSD_output

matrix or data.frame; Output from the TukeyHSD() function.

Value

matrix; containing p-values from TukeyHSD() in an appropriate format for other rootdetectR functions.

Examples

# conduct ANOVA and TukeyHSD
root_norm <- norm_10mm_standard(root_output)
aov_all_vs_all <- aov(LengthMM ~ Factor1 * Factor2, data = root_norm)
tuk <- TukeyHSD(aov_all_vs_all, ordered = FALSE)$`Factor1:Factor2`

# use Tukey Output to retrieve matrix
tukey_to_matrix(tuk)

PhilippJanitza/rootdetectR documentation built on Feb. 24, 2024, 6:46 a.m.