HSD2: Compute Tukey Honest Significant Differences (two-factor)

View source: R/HSD2.R

HSD2R Documentation

Compute Tukey Honest Significant Differences (two-factor)

Description

The HSD2() is used to Compute Tukey Honest Significant Differences for grouped data and create compare2-class. This function is only applicable to two-factor analysis, see HSD for a single factor version of the function.

Usage

HSD2(data, .group1, .group2, y, ...)

Arguments

data

An easynem-class data.

.group1

Grouping variables factor 1.

.group2

Grouping variables factor 2.

y

Dependent variable (numeric data).

...

Other parameters for TukeyHSD.

Details

To facilitate code interpretation, It is recommended to use this function in conjunction with the calc_compare2 function:

nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2)

Value

An compare2-class object.

See Also

Other functions related to differential analysis methods: TTest2, TTest, WilcoxTest2, WilcoxTest, KruskalTest2, KruskalTest, LSD2, LSD, HSD.

Examples

nem <- read_nem(tab = easynem_example("nemtab1.csv"),
                tax = easynem_example("nemtax1.csv"),
                meta = easynem_example("nemmeta1.csv"))
nem_test <- nem |>
              calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2)
nem_test

easynem documentation built on Nov. 5, 2025, 7:39 p.m.