Learn R Programming

easynem (version 1.0.3)

nem_plot,ter-method: Visualizing the results of the ternary analysis (single factor)

Description

The nem_plot function is generalized to the ter-class and is used to visualize the results of the ternary analysis. This function visualizes the distribution of nematode communities using the relative abundance of nematodes of cp1, cp2, and cp3-5 or the relative biomass of herbivorous nematodes, bacterivorous nematodes, and fungivorous nematodes as the three axes of a ternary plot.

Usage

# S4 method for ter
nem_plot(object, type, point_size = 1, legend_cex = 0.9, ...)

Value

A recordedplot object from Ternary::TernaryPlot.

Arguments

object

A ter-class object.

type

Visualize the nematodes by their feeding habits or by their cp values.

point_size

Size of the points. Default is 1.

legend_cex

Size of the legend text. Default is 0.9

...

Additional parameters passed to Ternary::TernaryPlot().

Details

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

nem_plot <- nem |> calc_ter(Treatments) |> nem_plot()

References

  • https://shiny.wur.nl/ninja/

  • Goede, RGM de, T. Bongers, and C. H. Ettema. "Graphical presentation and interpretation of nematode community structure: cp triangles." (1993): 743-750.

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

Run this code
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_plot <- nem |>
            calc_ter(Treatments) |>
            nem_plot(type = feeding)
nem_plot
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_plot <- nem |>
            calc_ter(Treatments) |>
            nem_plot(type = cp)
nem_plot

Run the code above in your browser using DataLab