nem_plot-compare-method: Visualizing the results of multiple comparisons (single...

nem_plot,compare-methodR Documentation

Visualizing the results of multiple comparisons (single factor)

Description

The nem_plot function is generalized to the compare-class and is used to visualize the results of single-factor multiple comparisons.

Usage

## S4 method for signature 'compare'
nem_plot(object, type = 1, add, ...)

Arguments

object

A compare-class object.

type

type = 1, draws a box plot; type = 2 draws a bar plot. Default type = 1.

add

Add standard deviation or standard error (only used when drawing a bar plot).

...

Other parameters to be expanded.

Details

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

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

Value

An gg or ggplot object.

See Also

The nem_plot() is used to visualize the calculation results and is a generalized function for multiple classes including beta-class, beta2-class, compare-class, compare2-class, ef-class, ef2-class, funguild-class, funguild2-class, mf-class, mf2-class, ter-class, ter2-class, etc.

Examples

nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_plot <- nem |> calc_compare(.group = Treatments,
              y = Mesorhabditis,
              method = LSD) |>
            nem_plot()
nem_plot
nem_plot <- nem |> calc_compare(.group = Treatments,
              y = Mesorhabditis,
              method = HSD) |>
            nem_plot(type = 2, add = "mean_se")
nem_plot

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