| Title: | Ecological Indices Calculator for Nematode Communities |
|---|---|
| Description: | Provides a computational toolkit for analyzing nematode communities in ecological studies. Includes methods to quantify nematode-based ecological indicators such as metabolic footprints, energy flow metrics, and community structure. These tools support assessments of soil health, ecosystem functioning, and trophic interactions, standardizing the use of nematodes as bioindicators. |
| Authors: | Yuxuan He [aut, cre] (ORCID: <https://orcid.org/0009-0007-1149-5554>), Dong Wang [ths], Yuan Miao [ths] |
| Maintainer: | Yuxuan He <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.3.0 |
| Built: | 2026-06-07 10:38:53 UTC |
| Source: | https://github.com/h-xuanjiu/nematode |
This function calculates the Basic Index (BI) for ecological communities.
cal.BI(data, ...) ## S3 method for class 'data.frame' cal.BI(data, ...) ## S3 method for class 'matrix' cal.BI(data, ...) ## Default S3 method: cal.BI(data, ...)cal.BI(data, ...) ## S3 method for class 'data.frame' cal.BI(data, ...) ## S3 method for class 'matrix' cal.BI(data, ...) ## Default S3 method: cal.BI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
BI |
Basic Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.BI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.BI(data = df)
This function calculates the Channel Index (CI) for ecological communities.
cal.CI(data, ...) ## S3 method for class 'data.frame' cal.CI(data, ...) ## S3 method for class 'matrix' cal.CI(data, ...) ## Default S3 method: cal.CI(data, ...)cal.CI(data, ...) ## S3 method for class 'data.frame' cal.CI(data, ...) ## S3 method for class 'matrix' cal.CI(data, ...) ## Default S3 method: cal.CI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
CI |
Channel Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.CI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.CI(data = df)
This function calculates the Enrichment Index (EI) for ecological communities.
cal.EI(data, ...) ## S3 method for class 'data.frame' cal.EI(data, ...) ## S3 method for class 'matrix' cal.EI(data, ...) ## Default S3 method: cal.EI(data, ...)cal.EI(data, ...) ## S3 method for class 'data.frame' cal.EI(data, ...) ## S3 method for class 'matrix' cal.EI(data, ...) ## Default S3 method: cal.EI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
EI |
Enrichment Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.EI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.EI(data = df)
This function calculates the Shannon-Wiener Index (H) for ecological communities.
cal.H(data, ...) ## S3 method for class 'data.frame' cal.H(data, ...) ## S3 method for class 'matrix' cal.H(data, ...) ## Default S3 method: cal.H(data, ...)cal.H(data, ...) ## S3 method for class 'data.frame' cal.H(data, ...) ## S3 method for class 'matrix' cal.H(data, ...) ## Default S3 method: cal.H(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
H |
Shannon-Wiener Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.H(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.H(data = df)
This function calculates the Pielou's Evenness Index (J) for ecological communities.
cal.J(data, ...) ## S3 method for class 'data.frame' cal.J(data, ...) ## S3 method for class 'matrix' cal.J(data, ...) ## Default S3 method: cal.J(data, ...)cal.J(data, ...) ## S3 method for class 'data.frame' cal.J(data, ...) ## S3 method for class 'matrix' cal.J(data, ...) ## Default S3 method: cal.J(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
J |
Pielou's Evenness Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.J(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.J(data = df)
This function calculates the Maturity Index (MI) for ecological communities.
cal.MI(data, ...) ## S3 method for class 'data.frame' cal.MI(data, ...) ## S3 method for class 'matrix' cal.MI(data, ...) ## Default S3 method: cal.MI(data, ...)cal.MI(data, ...) ## S3 method for class 'data.frame' cal.MI(data, ...) ## S3 method for class 'matrix' cal.MI(data, ...) ## Default S3 method: cal.MI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
MI |
Maturity Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.MI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.MI(data = df)
This function calculates the Nematode Channel Ratio (NCR) for ecological communities.
cal.NCR(data, ...) ## S3 method for class 'data.frame' cal.NCR(data, ...) ## S3 method for class 'matrix' cal.NCR(data, ...) ## Default S3 method: cal.NCR(data, ...)cal.NCR(data, ...) ## S3 method for class 'data.frame' cal.NCR(data, ...) ## S3 method for class 'matrix' cal.NCR(data, ...) ## Default S3 method: cal.NCR(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
NCR |
Nematode Channel Ratio for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.NCR(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.NCR(data = df)
This function calculates the Plant Parasite Index (PPI) for ecological communities.
cal.PPI(data, ...) ## S3 method for class 'data.frame' cal.PPI(data, ...) ## S3 method for class 'matrix' cal.PPI(data, ...) ## Default S3 method: cal.PPI(data, ...)cal.PPI(data, ...) ## S3 method for class 'data.frame' cal.PPI(data, ...) ## S3 method for class 'matrix' cal.PPI(data, ...) ## Default S3 method: cal.PPI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
PPI |
Plant Parasite Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.PPI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.PPI(data = df)
This function calculates the Structure Index (SI) for ecological communities.
cal.SI(data, ...) ## S3 method for class 'data.frame' cal.SI(data, ...) ## S3 method for class 'matrix' cal.SI(data, ...) ## Default S3 method: cal.SI(data, ...)cal.SI(data, ...) ## S3 method for class 'data.frame' cal.SI(data, ...) ## S3 method for class 'matrix' cal.SI(data, ...) ## Default S3 method: cal.SI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
SI |
Structure Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.SI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.SI(data = df)
This function calculates the Simpson Index for ecological communities.
cal.Simpson(data, ...) ## S3 method for class 'data.frame' cal.Simpson(data, ...) ## S3 method for class 'matrix' cal.Simpson(data, ...) ## Default S3 method: cal.Simpson(data, ...)cal.Simpson(data, ...) ## S3 method for class 'data.frame' cal.Simpson(data, ...) ## S3 method for class 'matrix' cal.Simpson(data, ...) ## Default S3 method: cal.Simpson(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
Simpson |
Simpson's Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.Simpson(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.Simpson(data = df)
This function calculates the Species Richness Index (SRI) for ecological communities.
cal.SRI(data, method = "Margalef", ...) ## S3 method for class 'data.frame' cal.SRI(data, method = "Margalef", ...) ## S3 method for class 'matrix' cal.SRI(data, method = "Margalef", ...) ## Default S3 method: cal.SRI(data, method = "Margalef", ...)cal.SRI(data, method = "Margalef", ...) ## S3 method for class 'data.frame' cal.SRI(data, method = "Margalef", ...) ## S3 method for class 'matrix' cal.SRI(data, method = "Margalef", ...) ## Default S3 method: cal.SRI(data, method = "Margalef", ...)
data |
|
method |
The method used to calculate the Species Richness Index. Default is
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
SRI |
Species Richness Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.SRI(data = df, method = "Margalef")# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.SRI(data = df, method = "Margalef")
This function calculates the Trophic Diversity (TD) Index for ecological communities.
cal.TD(data, ...) ## S3 method for class 'data.frame' cal.TD(data, ...) ## S3 method for class 'matrix' cal.TD(data, ...) ## Default S3 method: cal.TD(data, ...)cal.TD(data, ...) ## S3 method for class 'data.frame' cal.TD(data, ...) ## S3 method for class 'matrix' cal.TD(data, ...) ## Default S3 method: cal.TD(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
TD |
Trophic Diversity index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.TD(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.TD(data = df)
This function calculates the Wasilewska Index (WI) for ecological communities.
cal.WI(data, ...) ## S3 method for class 'data.frame' cal.WI(data, ...) ## S3 method for class 'matrix' cal.WI(data, ...) ## Default S3 method: cal.WI(data, ...)cal.WI(data, ...) ## S3 method for class 'data.frame' cal.WI(data, ...) ## S3 method for class 'matrix' cal.WI(data, ...) ## Default S3 method: cal.WI(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
WI |
Wasilewska Index for each sample |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.WI(data = df)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) cal.WI(data = df)
This generic function validates nematode genus names by checking their existence in a reference database (nematode.info). It supports multiple input types and provides flexible output formats.
check_nematode_genus(Query.genus, Query.col = NULL, show.details = TRUE, ...) ## S3 method for class 'character' check_nematode_genus(Query.genus, Query.col = NULL, show.details = TRUE, ...) ## S3 method for class 'data.frame' check_nematode_genus(Query.genus, Query.col, show.details = TRUE, ...) ## Default S3 method: check_nematode_genus(Query.genus, Query.col = NULL, show.details = TRUE, ...)check_nematode_genus(Query.genus, Query.col = NULL, show.details = TRUE, ...) ## S3 method for class 'character' check_nematode_genus(Query.genus, Query.col = NULL, show.details = TRUE, ...) ## S3 method for class 'data.frame' check_nematode_genus(Query.genus, Query.col, show.details = TRUE, ...) ## Default S3 method: check_nematode_genus(Query.genus, Query.col = NULL, show.details = TRUE, ...)
Query.genus |
Input to check: can be |
Query.col |
When input is |
show.details |
Logical controlling output format:
|
... |
Additional arguments (currently unused). |
Output varies by input type and show.details:
For character vector input:
show.details = TRUE: data.frame with query, existence, and reference data
show.details = FALSE: character vector of invalid genera
For data.frame input: same as character input for the specified column
For unsupported types: error message
# Check character vector check_nematode_genus(c("Caenorhabditis", "Wrong")) # Check data.frame column df <- data.frame(genus = c("Meloidogyne", "XXX")) check_nematode_genus(Query.genus = df, Query.col = "genus")# Check character vector check_nematode_genus(c("Caenorhabditis", "Wrong")) # Check data.frame column df <- data.frame(genus = c("Meloidogyne", "XXX")) check_nematode_genus(Query.genus = df, Query.col = "genus")
This function calculates the relative or absolute abundance of nematodes in different CP (Colonizer-Persister) groups for each sample. The CP groups range from CP1 (colonizers, r-strategists) to CP5 (persisters, K-strategists). Genera without CP classification are grouped as No_CP.
cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'data.frame' cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'matrix' cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## Default S3 method: cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...)cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'data.frame' cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'matrix' cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## Default S3 method: cp_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...)
data |
|
total.abundance |
|
relative |
|
... |
Additional arguments (currently unused). |
A data frame with seven columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
CP1 |
Relative or absolute abundance of CP1 group (colonizers, r-strategists) |
CP2 |
Relative or absolute abundance of CP2 group |
CP3 |
Relative or absolute abundance of CP3 group |
CP4 |
Relative or absolute abundance of CP4 group |
CP5 |
Relative or absolute abundance of CP5 group (persisters, K-strategists) |
No_CP |
Relative or absolute abundance of genera without CP classification (only present if such genera exist) |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) abundance <- data.frame( abundance = c(100, 150, 120), row.names = c("A", "B", "C") ) cp_rel_abundance(df, abundance, relative = FALSE) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Cephalobus", "Caenorhabditis", "Pratylenchus") row.names(mat) <- c("A", "B", "C") cp_rel_abundance(mat)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) abundance <- data.frame( abundance = c(100, 150, 120), row.names = c("A", "B", "C") ) cp_rel_abundance(df, abundance, relative = FALSE) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Cephalobus", "Caenorhabditis", "Pratylenchus") row.names(mat) <- c("A", "B", "C") cp_rel_abundance(mat)
This function calculates the relative or absolute abundance of four feeding types of nematodes in each sample. The feeding types include bacterial feeders (Ba), fungus feeders (Fu), plant feeders (Pp), and omnivores/predators (Op).
diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'data.frame' diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'matrix' diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## Default S3 method: diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...)diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'data.frame' diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## S3 method for class 'matrix' diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...) ## Default S3 method: diet_rel_abundance(data, total.abundance = NULL, relative = TRUE, ...)
data |
|
total.abundance |
|
relative |
|
... |
Additional arguments (currently unused). |
A data frame with five columns:
Sample.ID |
Character vector of sample identifiers (from row names of |
Ba |
Relative or absolute abundance of bacterial feeders |
Fu |
Relative or absolute abundance of fungus feeders |
Pp |
Relative or absolute abundance of plant feeders |
Op |
Relative or absolute abundance of omnivores/predators |
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) abundance <- data.frame( abundance = c(100, 150, 120), row.names = c("A", "B", "C") ) diet_rel_abundance(df, abundance, relative = FALSE) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Cephalobus", "Caenorhabditis", "Pratylenchus") row.names(mat) <- c("A", "B", "C") diet_rel_abundance(mat)# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) abundance <- data.frame( abundance = c(100, 150, 120), row.names = c("A", "B", "C") ) diet_rel_abundance(df, abundance, relative = FALSE) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Cephalobus", "Caenorhabditis", "Pratylenchus") row.names(mat) <- c("A", "B", "C") diet_rel_abundance(mat)
This function calculates various ecological indices based on the provided nematode genus abundance data. It supports a range of indices, including taxonomic diversity, Shannon diversity index, Pielou's evenness index, Simpson's index, and more. Users can specify which indices to calculate or use the default option to calculate all supported indices.
Ecological.Indices(data, indices = "All", method = NULL, ...) ## S3 method for class 'data.frame' Ecological.Indices(data, indices = "All", method = NULL, ...) ## S3 method for class 'matrix' Ecological.Indices(data, indices = "All", method = NULL, ...) ## Default S3 method: Ecological.Indices(data, indices = "All", method = NULL, ...)Ecological.Indices(data, indices = "All", method = NULL, ...) ## S3 method for class 'data.frame' Ecological.Indices(data, indices = "All", method = NULL, ...) ## S3 method for class 'matrix' Ecological.Indices(data, indices = "All", method = NULL, ...) ## Default S3 method: Ecological.Indices(data, indices = "All", method = NULL, ...)
data |
|
indices |
A character vector specifying the ecological indices to be calculated. The following indices are supported:
Additionally, specifying |
method |
The method to use for calculating the Species Richness Index. Default is
|
... |
Additional arguments (currently unused). |
A data frame containing the calculated indices. The data frame includes a Sample.ID column and additional columns for each requested index.
# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) Ecological.Indices(data = df, indices = "All", method = "Menhinick")# Example with a data frame df <- data.frame( Cephalobus = c(10, NA, 15), Caenorhabditis = c(5, 10, NA), Pratylenchus = c(8, 12, 10), row.names = c("A", "B", "C") ) Ecological.Indices(data = df, indices = "All", method = "Menhinick")
This function performs fuzzy matching of nematode genus names against a reference database using Levenshtein distance (edit distance) with case insensitivity.
fuzzy_genus_match(Query.genus, max_dist = 2, ...)fuzzy_genus_match(Query.genus, max_dist = 2, ...)
Query.genus |
A |
max_dist |
Maximum allowed Levenshtein distance for matches (default = 2) |
... |
Additional parameters (currently unused) |
A data frame containing:
Query.genus - Original query genus name
CorrectName - Matched genus name from reference
Distance - Edit distance between query and match
Additional columns - All columns from nematode.info for matched records
fuzzy_genus_match(c("Harterta", "Meloidogyne"))fuzzy_genus_match(c("Harterta", "Meloidogyne"))
Nematode Energy Footprints (NEF) Calculation
NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...) ## S3 method for class 'data.frame' NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...) ## S3 method for class 'matrix' NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...) ## Default S3 method: NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...)NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...) ## S3 method for class 'data.frame' NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...) ## S3 method for class 'matrix' NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...) ## Default S3 method: NEF(data, abundance, AE = list(Ba = 0.6, Fu = 0.38, Pp = 0.25, Op = 0.5), ...)
data |
A data.frame or matrix containing nematode genus abundance data. Rows represent samples, and columns represent genera. |
abundance |
A data.frame containing abundance information for the samples. It must match the row names of the input data. |
AE |
A named list specifying the assimilation efficiencies for nematode feeding groups. Must contain the following elements:
|
... |
Additional arguments (currently unused). |
A list object of class "NEF" containing the following components:
A list with original input data:
data - Original genus abundance data.frame or matrix of nematode genera
Abundance - Total abundance data used for calculations
A list containing energy flow calculations:
Energy.flux: Data frame of energy flows () per feeding group. Columns:
Sample.ID - Sample identifier
BaEF - Bacterial feeders energy flows
FuEF - Fungal feeders energy flows
PpEF - Plant feeders energy flows
OpEF - Omnivores/Predators energy flows
TNEF - Total energy flows of nematodes
C.flux.node: Data frame of Biomass () per feeding group. Columns:
Sample.ID - Sample identifier
Ba - Bacterial feeders biomass
Fu - Fungal feeders biomass
Pp - Plant feeders biomass
Op - Omnivores/Predators biomass
C.flux.path: Data frame of energy flows (). Columns:
Sample.ID - Sample identifier
R.to.Ba - Carbon flux from Resources to bacterial feeders
R.to.Fu - Carbon flux from Resources to fungal feeders
R.to.Pp - Carbon flux from Resources to plant feeders
Ba.to.Op - Carbon flux from bacterial to omnivorous channels
Fu.to.Op - Carbon flux from fungal to omnivorous channels
Pp.to.Op - Carbon flux from plant to omnivorous channels
U: Data frame of ecosystem stability indices. Columns:
Sample.ID - Sample identifier
U - Energy flow uniformity index
data <- data.frame( Cephalobus = c(10, 20, 30), Eucephalobus = c(5, 10, 12), Acrobeloides = c(1, 2, 3), Caenorhabditis = c(5, 8, 15), Aphelenchus = c(5, 13, 11), Leptonchus = c(3, 10, 15), Pratylenchus = c(9, 2, 15), Tylenchus = c(5, 0, 15), Mesodorylaimus = c(7, 10, 18), Discolaimus = c(1, 10, 25), row.names = c("Sample1", "Sample2", "Sample3") ) abundance <- data.frame( Abundance = c(100, 200, 300), row.names = c("Sample1", "Sample2", "Sample3") ) result <- NEF(data, abundance) print(result)data <- data.frame( Cephalobus = c(10, 20, 30), Eucephalobus = c(5, 10, 12), Acrobeloides = c(1, 2, 3), Caenorhabditis = c(5, 8, 15), Aphelenchus = c(5, 13, 11), Leptonchus = c(3, 10, 15), Pratylenchus = c(9, 2, 15), Tylenchus = c(5, 0, 15), Mesodorylaimus = c(7, 10, 18), Discolaimus = c(1, 10, 25), row.names = c("Sample1", "Sample2", "Sample3") ) abundance <- data.frame( Abundance = c(100, 200, 300), row.names = c("Sample1", "Sample2", "Sample3") ) result <- NEF(data, abundance) print(result)
A dataset containing the average dry body mass (in micrograms) of nematode genera and families, compiled from morphological measurements and allometric scaling. Essential for metabolic rate calculations and size-spectrum analyses in soil ecology.
nematode.ave.massnematode.ave.mass
A data frame with 1094 rows and 4 variables:
Nematode genus name (character), taxonomically validated against Nemaplex database
Corresponding taxonomic family (character)
Mean dry mass per genus (numeric, g)
Mean dry mass per family (numeric, g)
Nemaplex.UCDavis.edu; Revision Date: 02/02/2026; Accessed 03/18/2026
Website: http://nemaplex.ucdavis.edu/
Use nematode.info for complementary trait data.
# Load data data(nematode.ave.mass) # Find mass range within a family (e.g. Rhabditidae) rhabditidae <- subset(nematode.ave.mass, Family == "Rhabditidae") range(rhabditidae$Genus.Average.Mass, na.rm = TRUE) # Convert to biomass (example: 100 individuals of Acanthopharynx) 100 * subset(nematode.ave.mass, Genus == "Acanthopharynx")$Genus.Average.Mass# Load data data(nematode.ave.mass) # Find mass range within a family (e.g. Rhabditidae) rhabditidae <- subset(nematode.ave.mass, Family == "Rhabditidae") range(rhabditidae$Genus.Average.Mass, na.rm = TRUE) # Convert to biomass (example: 100 individuals of Acanthopharynx) 100 * subset(nematode.ave.mass, Genus == "Acanthopharynx")$Genus.Average.Mass
A dataset containing taxonomic classification and functional traits of nematode genera, including feeding habits and ecological group (c-p value).
nematode.infonematode.info
A data frame with 2524 rows and 4 variables:
Nematode genus name (character), e.g. "Parascaris", "Heterakis"
Taxonomic family name (character), e.g. "Ascarididae", "Heterakidae"
Feeding behavior category (character), e.g. "Bacterial feeders", "Omnivores"
Colonizer-Persister group (numeric, 1-5)
This dataset is particularly useful for:
Ecological studies of soil nematode communities
Trophic network analysis
Calculating nematode maturity indices (e.g. MI, PPI)
Nemaplex.UCDavis.edu; Revision Date: 03/18/2026; Accessed 03/18/2026
Website: http://nemaplex.ucdavis.edu/
# Load the data data(nematode.info) # Count nematodes by feeding habit table(nematode.info$Feeding_habit) # Find all genera in Ascarididae family subset(nematode.info, Family == "Ascarididae")# Load the data data(nematode.info) # Count nematodes by feeding habit table(nematode.info$Feeding_habit) # Find all genera in Ascarididae family subset(nematode.info, Family == "Ascarididae")
This function calculates various Nematode Metabolic Footprints (NMF) based on the input data and abundance information. It supports multiple types of NMF calculations and can handle data in different formats (data.frame or matrix).
NMF(data, abundance, type = "All", ...) ## S3 method for class 'data.frame' NMF(data, abundance, type = "All", ...) ## S3 method for class 'matrix' NMF(data, abundance, type = "All", ...) ## Default S3 method: NMF(data, abundance, type = "all", ...)NMF(data, abundance, type = "All", ...) ## S3 method for class 'data.frame' NMF(data, abundance, type = "All", ...) ## S3 method for class 'matrix' NMF(data, abundance, type = "All", ...) ## Default S3 method: NMF(data, abundance, type = "all", ...)
data |
|
abundance |
|
type |
Character vector specifying the type(s) of NMF to calculate.
|
... |
Additional arguments (currently unused). |
A data.frame containing the calculated NMF values for each sample. The columns represent different NMF types, and the rows correspond to samples.
data <- data.frame( Cephalobus = c(10, 20, 30), Eucephalobus = c(5, 10, 12), Acrobeloides = c(1, 2, 3), Caenorhabditis = c(5, 8, 15), Aphelenchus = c(5, 13, 11), Leptonchus = c(3, 10, 15), Pratylenchus = c(9, 2, 15), Tylenchus = c(5, 0, 15), Mesodorylaimus = c(7, 10, 18), Discolaimus = c(1, 10, 25), row.names = c("Sample1", "Sample2", "Sample3") ) abundance <- data.frame( Abundance = c(100, 200, 300), row.names = c("Sample1", "Sample2", "Sample3") ) result <- NMF(data, abundance, type = "All") print(result)data <- data.frame( Cephalobus = c(10, 20, 30), Eucephalobus = c(5, 10, 12), Acrobeloides = c(1, 2, 3), Caenorhabditis = c(5, 8, 15), Aphelenchus = c(5, 13, 11), Leptonchus = c(3, 10, 15), Pratylenchus = c(9, 2, 15), Tylenchus = c(5, 0, 15), Mesodorylaimus = c(7, 10, 18), Discolaimus = c(1, 10, 25), row.names = c("Sample1", "Sample2", "Sample3") ) abundance <- data.frame( Abundance = c(100, 200, 300), row.names = c("Sample1", "Sample2", "Sample3") ) result <- NMF(data, abundance, type = "All") print(result)
This function calculates the number of nematode species present in each sample. It counts the number of non-zero and non-empty nematode species for each sample.
num_species(data, ...) ## S3 method for class 'data.frame' num_species(data, ...) ## S3 method for class 'matrix' num_species(data, ...) ## Default S3 method: num_species(data, ...)num_species(data, ...) ## S3 method for class 'data.frame' num_species(data, ...) ## S3 method for class 'matrix' num_species(data, ...) ## Default S3 method: num_species(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data.frame with two columns:
Sample.ID |
Character vector of sample identifiers (from row names) |
NumSpecies |
Number of non-zero nematode species in each sample |
# Example with a data frame df <- data.frame( Species1 = c(10, NA, 15), Species2 = c(5, 10, NA), Species3 = c(8, 12, 10), row.names = c("A", "B", "C") ) num_species(df) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Species1", "Species2", "Species3") row.names(mat) <- c("A", "B", "C") num_species(mat)# Example with a data frame df <- data.frame( Species1 = c(10, NA, 15), Species2 = c(5, 10, NA), Species3 = c(8, 12, 10), row.names = c("A", "B", "C") ) num_species(df) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Species1", "Species2", "Species3") row.names(mat) <- c("A", "B", "C") num_species(mat)
This function calculates the relative abundance of nematodes for each sample. The relative abundance is defined as the proportion of each nematode's count to the total count of all nematodes in a sample.
rel_abundance(data, ...) ## S3 method for class 'data.frame' rel_abundance(data, ...) ## S3 method for class 'matrix' rel_abundance(data, ...) ## Default S3 method: rel_abundance(data, ...)rel_abundance(data, ...) ## S3 method for class 'data.frame' rel_abundance(data, ...) ## S3 method for class 'matrix' rel_abundance(data, ...) ## Default S3 method: rel_abundance(data, ...)
data |
|
... |
Additional arguments (currently unused). |
A data.frame or matrix (matching the input type) containing the relative abundance of each nematode in each sample.
# Example with a data frame df <- data.frame( Species1 = c(10, NA, 15), Species2 = c(5, 10, NA), Species3 = c(8, 12, 10), row.names = c("A", "B", "C") ) rel_abundance(df) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Species1", "Species2", "Species3") row.names(mat) <- c("A", "B", "C") rel_abundance(mat)# Example with a data frame df <- data.frame( Species1 = c(10, NA, 15), Species2 = c(5, 10, NA), Species3 = c(8, 12, 10), row.names = c("A", "B", "C") ) rel_abundance(df) # Example with a matrix mat <- matrix(c(10, NA, 15, 5, 10, NA, 8, 12, 10), nrow = 3, byrow = TRUE) colnames(mat) <- c("Species1", "Species2", "Species3") row.names(mat) <- c("A", "B", "C") rel_abundance(mat)
This function performs NMDS analysis on a dataset using the specified distance metric, and optionally runs PERMANOVA (adonis2) and ANOSIM tests for group differences. It supports both data.frame and matrix inputs.
runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'data.frame' runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'matrix' runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## Default S3 method: runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... )runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'data.frame' runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'matrix' runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## Default S3 method: runNMDS( data, group, distance = "bray", k = 2, decostand.method = "hellinger", autotransform = TRUE, adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... )
data |
|
group |
|
distance |
Distance metric to use (default: "bray"). See |
k |
Number of dimensions for NMDS (default: 2). |
decostand.method |
Standardization methods for community ecology data (default: "hellinger"). Set to |
autotransform |
Logical; whether to automatically transform the data (default: TRUE).
See |
adonis2 |
Logical; whether to perform PERMANOVA test using |
anosim |
Logical; whether to perform ANOSIM test using |
simper |
Logical; whether to perform SIMPER test using |
... |
Additional arguments passed to |
An object of class "NMDS" containing:
data - List containing the input data and group information
call - The function call
NMDS - NMDS results from metaMDS
adonis2 - PERMANOVA results (if adonis2 = TRUE)
anosim - ANOSIM results (if anosim = TRUE)
SIMPER - SIMPER results (if simper = TRUE)
metaMDS for details on NMDS implementation and distance measures
decostand for details on standardization methods
vegdist for available distance metrics
adonis2 for PERMANOVA
anosim for ANOSIM
simper for SIMPER
# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) nmds <- runNMDS(data, group = group_df)# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) nmds <- runNMDS(data, group = group_df)
This function performs PCoA analysis on a dataset using the specified distance metric, and optionally runs PERMANOVA (adonis2) and ANOSIM tests for group differences. It supports both data.frame and matrix inputs.
runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'data.frame' runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'matrix' runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## Default S3 method: runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... )runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'data.frame' runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## S3 method for class 'matrix' runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... ) ## Default S3 method: runPCoA( data, group, k = 2, distance = "bray", adonis2 = TRUE, anosim = TRUE, simper = TRUE, ... )
data |
|
group |
|
k |
Number of dimensions for PCoA (default: 2). |
distance |
Distance metric to use (default: "bray"). See |
adonis2 |
Logical; whether to perform PERMANOVA test using |
anosim |
Logical; whether to perform ANOSIM test using |
simper |
Logical; whether to perform SIMPER test using |
... |
Additional arguments passed to |
An object of class "PCoA" containing:
data - List containing the input data and group information
call - The function call
Points - Sample coordinates in the reduced space.
Eigenvalues - Variance explained by each principal coordinate axis.
adonis2 - PERMANOVA results (if adonis2 = TRUE)
anosim - ANOSIM results (if anosim = TRUE)
SIMPER - SIMPER results (if simper = TRUE)
cmdscale for details on cmdscale implementation
vegdist for available distance metrics
adonis2 for PERMANOVA
anosim for ANOSIM
simper for SIMPER
# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) pcoa <- runPCoA(data, group = group_df)# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) pcoa <- runPCoA(data, group = group_df)
Discriminating species between two groups using Bray-Curtis dissimilarities
runSimper(object, ...) ## S3 method for class 'Ordination' runSimper(object, ...) ## Default S3 method: runSimper(object, ...)runSimper(object, ...) ## S3 method for class 'Ordination' runSimper(object, ...) ## Default S3 method: runSimper(object, ...)
object |
An object of class "Ordination". |
... |
Additional arguments passed to |
The object of class "Ordination" containing (See runNMDS for details):
data - List containing the input data and group information
call - The function call
NMDS - NMDS results from metaMDS
SIMPER - SIMPER results
# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) nmds <- runNMDS(data, group = group_df, simper = FALSE) # Example nmds_simper <- runSimper(nmds) print(nmds_simper$SIMPER)# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) nmds <- runNMDS(data, group = group_df, simper = FALSE) # Example nmds_simper <- runSimper(nmds) print(nmds_simper$SIMPER)
Provides a concise summary of Non-Metric Multidimensional Scaling (NMDS) analysis results, including stress value, PERMANOVA (adonis2) and ANOSIM test statistics.
Provides a concise summary of Principal Coordinates Analysis (PCoA) analysis results, including PERMANOVA (adonis2) and ANOSIM test statistics.
## S3 method for class 'NMDS' summary(object, ...) ## S3 method for class 'PCoA' summary(object, ...)## S3 method for class 'NMDS' summary(object, ...) ## S3 method for class 'PCoA' summary(object, ...)
object |
An object of class "PCoA" produced by |
... |
Additional arguments (currently not used). |
A list containing:
stress - NMDS stress value
points - Sample coordinates in the reduced space
adonis2 - PERMANOVA results (R2, p-value, significance)
anosim - ANOSIM results (R statistic, p-value, significance)
A list containing:
points - Sample coordinates in the reduced space.
eig - Variance explained by each principal coordinate axis.
adonis2 - PERMANOVA results (R2, p-value, significance)
anosim - ANOSIM results (R statistic, p-value, significance)
# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) # Example for summary.NMDS nmds <- runNMDS(data, group = group_df) summary(nmds) # Example for summary.PCoA pcoa <- runPCoA(data, group = group_df) summary(pcoa)# Example with default Bray-Curtis distance data <- data.frame( Cephalobus = c(10, 20, 30, 1, 6, 5), Eucephalobus = c(5, 10, 12, 30, 1, 6), Acrobeloides = c(1, 2, 3, 12, 30, 1), Caenorhabditis = c(5, 8, 15, 2, 3, 12), Aphelenchus = c(5, 13, 11, 15, 2, 3), Leptonchus = c(3, 10, 15, 0, 15, 11), Pratylenchus = c(9, 2, 15, 15, 0, 15), Tylenchus = c(5, 0, 15, 11, 15, 2), Mesodorylaimus = c(7, 10, 18, 3, 12, 30), Discolaimus = c(1, 10, 25, 10, 18, 3), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) group_df <- data.frame( group = c("A", "A", "B", "B", "C", "C"), row.names = c("Sample1", "Sample2", "Sample3", "Sample4", "Sample5", "Sample6") ) # Example for summary.NMDS nmds <- runNMDS(data, group = group_df) summary(nmds) # Example for summary.PCoA pcoa <- runPCoA(data, group = group_df) summary(pcoa)