Learn R Programming

easynem (version 1.0.3)

calc_compare: Multiple comparisons between treatments (single factor)

Description

The calc_compare is used for multiple comparisons between different treatments and create compare-class. This function is only applicable to single factor analysis, see calc_compare2 for a two factor version of the function.

Usage

calc_compare(data, .group, y, method, ...)

Value

An compare-class object.

Arguments

data

An easynem-class data.

.group

Grouping variables (supports only two groups).

y

Dependent variable (numeric data).

method

The method of difference comparison. Such as TTest, TTest2, WilcoxTest, WilcoxTest2, KruskalTest, KruskalTest2, LSD, LSD2, HSD, HSD2, etc.

...

Other parameters for t.test.

Details

To facilitate code interpretation, it is recommended to use the pipe symbol |> to connect functions:

nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = TTest)

See Also

Other functions in this R package for data calculations: calc_beta, calc_beta2, calc_compare2, calc_alpha, calc_nemindex, calc_funguild, calc_funguild2, calc_mf, calc_mf2, calc_ter, calc_ter2, calc_ef, calc_ef2.

Examples

Run this code
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_ttest <- nem |>
              filter_name(meta, Treatments %in% c("CK", "C8")) |>
              calc_compare(.group = Treatments, y = Mesorhabditis, method = TTest)
nem_ttest

Run the code above in your browser using DataLab