Learn R Programming

easynem

This R package has a built-in Nemaplex database for nematodes, which can be used to search for various nematodes. At the same time, this R package supports various nematode communities and functional analyses such as nematode diversity, maturity index, metabolic footprint, and functional guild.

Installation

You can install the development version of easynem from GitHub with:

# install.packages("devtools")
devtools::install_github("whkygl/easynem")

Example

This is a basic example which shows you how to solve a common problem:

library(easynem)
## basic example code

Calculation of metabolic footprint of nematode communities:

nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_plot <- nem |>
            calc_nemindex() |>
            calc_mf(Treatments) |>
            nem_plot(kei = 30, ksi = 20)
nem_plot

Calculation of energy structure of nematode communities:

nem_plot <- nem |>
            calc_nemindex() |>
            calc_ef(Treatments) |>
            nem_plot()
nem_plot

Copy Link

Version

Install

install.packages('easynem')

Version

1.0.3

License

MIT + file LICENSE

Maintainer

Wang Kunguang

Last Published

October 28th, 2025

Functions in easynem (1.0.3)

beta2-class

A class to store beta diversity results (two-factor)
calc_compare2

Multiple comparisons between treatments (two-factor)
calc_ef2

Calculation of energy flow in nematode communities (two-factor)
beta-class

A class to store beta diversity results (single factor)
calc_alpha

Alpha diversity analysis, generating alpha-class
calc_lm

Linear regression analysis of easynem-class (single factor)
calc_lm2

Linear regression analysis of easynem-class (two-factor)
calc_nemindex

Calculate multiple nematode ecological indices and generate nemindex class
calc_ter

Trivariate analysis of nematode feeding or cp value (single factor)
calc_mf2

Calculating the metabolic footprint of nematodes (two-factor)
geom_encircle

Automatically enclose points in a polygon
calc_mf

Calculating the metabolic footprint of nematodes (single factor)
funguild2-class

Class for storing computational results of nematode functional guild analysis (two-factor)
easynem_example

Path to example files
ef-class

A S4 class to store energy flow results (single factor)
mf-class

A S4 class to store Metabolic footprints results (single factor)
nem_plot,compare-method

Visualizing the results of multiple comparisons (single factor)
calc_funguild2

Nematode food web analysis (two-factor)
calc_funguild

Nematode food web analysis (single factor)
easynem-class

The main experiment-level class for easynem data
compare2-class

A S4 class to store multiple comparisons results (two-factor).
nem_calc

calc
nem_plot,mf2-method

Visualizing the metabolic footprint of nematode communities (two-factor)
nem_database

Nematode database search
mf2-class

A S4 class to store Metabolic footprints results (two-factor)
nem_plot,mf-method

Visualizing the metabolic footprint of nematode communities (single factor)
nem_plot,beta2-method

Visualization of beta diversity results (two-factor)
nem_plot,compare2-method

Visualizing the results of multiple comparisons (two-factor)
nem_plot,ter-method

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

Visualization of beta diversity results (single factor)
nem_plot,lme-method

Visualizing the results of linear regression (single factor)
nem_plot,funguild2-method

Visualizing nematode functional guild data (two-factor)
nem_plot,funguild-method

Visualizing nematode functional guild data (single factor)
nemtab

Table of soil nematode abundance in kiwifruit orchards
nem_plot,lme2-method

Visualizing the results of linear regression (two-factor)
calc_beta

Beta diversity analysis, generating beta-class (single factor)
ef2-class

A S4 class to store energy flow results (two-factor)
calc_beta2

Beta diversity analysis, generating beta2-class (two-factor)
nem_plot,ter2-method

Visualizing the results of the ternary analysis (two-factor)
ter2-class

A S4 class to store the ternary analysis results (two-factor)
read_nem2

Build easynem-class objects from their tibble type object
ter-class

A S4 class to store the ternary analysis results (single factor)
order_factor

order_factor
filter_name

Filter easynem by column name and keep rows that match a condition
nemtax

Nematode taxonomy table
trans_formula

Formula conversion for easynem's meta
trans_formula_v

Formula conversion for easynem's meta (Vectorization)
nem_plot,ef-method

Visualizing the energy structure of nematode communities (single factor)
read_nem

Build easynem-class objects from their csv file
trans_rare

Randomly rarefied OTU or ASV tables of nematodes for amplicon sequencing data
compare-class

A S4 class to store multiple comparisons results (single factor).
trans_combine

Merge multiple columns of easynem's meta
calc_ter2

Trivariate analysis of nematode feeding or cp value (two-factor)
funguild-class

Class for storing computational results of nematode functional guild analysis (single factor)
filter_num

Filter easynem's tab by discovery rate or abundance
lme-class

A S4 class to store the linear regression analysis results (single factor)
nem_trans

nem_trans
nem_plot,ef2-method

Visualizing the energy structure of nematode communities (two-factor)
nem_plot

Visualize the results of the calculation
trans_norm

Normalizing the nematode abundance table
nemindex-class

Class for storing nematode ecological index calculation results
lme2-class

A S4 class to store the linear regression analysis results (two-factor)
trans_name

Reorganize the easynem's tab by taxonomic name
nemmeta

Experimental Design of Kiwifruit Cover Crops
HSD2

Compute Tukey Honest Significant Differences (two-factor)
HSD

Compute Tukey Honest Significant Differences (single factor)
LSD

Multiple comparisons, "Least significant difference" and Adjust P-values (single factor)
LSD2

Multiple comparisons, "Least significant difference" and Adjust P-values (two-factor)
WilcoxTest

Perform wilcoxon-test on easynem meta-table by treatment (single factor)
KruskalTest

Perform Kruskal-Wallis test on easynem meta-table by treatment (single factor)
TTest

Perform t-test on easynem meta-table by treatment (single factor)
WilcoxTest2

Perform wilcoxon-test on easynem meta-table by treatment (two-factor)
TTest2

Perform t-test on easynem meta-table by treatment (two-factor)
KruskalTest2

Perform Kruskal-Wallis test on easynem meta-table by treatment (two-factor)
calc_compare

Multiple comparisons between treatments (single factor)
calc_ef

Calculation of energy flow in nematode communities (single factor)
alpha-class

Class for storing alpha diversity calculation results