Learn R Programming

easynem (version 1.0.3)

HSD2: 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, ...)

Value

An compare2-class object.

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)

See Also

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

Examples

Run this code
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

Run the code above in your browser using DataLab