get_sig_letters: Create Significance Letter Encoding

View source: R/helpful_functions.R

get_sig_lettersR Documentation

Create Significance Letter Encoding

Description

The function takes a matrix as input (from rootdetectR ANOVA analysis or from tukey_to_matrix function) and returns a table with significance letters.

Usage

get_sig_letters(tukmatrix)

Arguments

tukmatrix

matrix; Output from ANOVA functions (onefacaof_fac1, onefacaov_fac2, twofacaov, interaction_twofacaov) or tukey_to_matrix function

Value

data.frame; containing Label and the corresponding significance letter

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 an appropriate matrix
tuk_mat <- tukey_to_matrix(tuk)

# obtain significance_letters
get_sig_letters(tuk_mat)

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