| Title: | Nematode Community Analysis |
|---|---|
| Description: | Provides a built-in Nemaplex database for nematodes, which can be used to search for various nematodes. Also supports various nematode community and functional analyses such as nematode diversity, maturity index, metabolic footprint, and functional guild. The methods are based on <https://shiny.wur.nl/ninja/>, Bongers, T. (1990) <doi:10.1007/BF00324627>, Ferris, H. (2010) <doi:10.1016/j.ejsobi.2010.01.003>, Wan, B. et al. (2022) <doi:10.1016/j.soilbio.2022.108695>, and Van Den Hoogen, J. et al. (2019) <doi:10.1038/s41586-019-1418-6>. |
| Authors: | Wang Kunguang [aut, cre] (ORCID: <https://orcid.org/0000-0001-7384-5002>) |
| Maintainer: | Wang Kunguang <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.3 |
| Built: | 2026-05-24 09:11:30 UTC |
| Source: | https://github.com/whkygl/easynem |
The alpha-class is an extension of the easynem-class to store
the results of alpha diversity calculations.
resultThe calculation results of storage alpha diversity.
The constructor, calc_alpha; Visualization function, nem_plot.
beta-class is used to store the results of beta diversity analysis,
including results for drawing and comparing differences between groups.
Users can construct a beta-class through calc_beta,
which can then be connected to nem_plot to visualize the results.
metaA data frame storing basic elements for visualization.
resultA character of pairwise comparison results.
tempA character vector of the difference comparison.
The constructor, calc_beta; Class for storing two-factor beta
diversity analysis, beta2-class; Visualization function,
nem_plot.
beta2-class is used to store the results of beta diversity analysis,
including results for drawing and comparing differences between groups.
Users can construct a beta2-class through calc_beta2,
which can then be connected to nem_plot to visualize the results.
metaA data frame storing basic elements for visualization.
resultA character of pairwise comparison results.
tempA character vector of the difference comparison.
The constructor, calc_beta2; Class for storing single factor beta
diversity analysis, beta-class; Visualization function,
nem_plot.
The calc_alpha() is used to perform alpha diversity analysis and create
alpha-class. This function can be used to calculate various alpha
diversity indices such as Chao1, ACE, Shannon, Simpson,
etc.
calc_alpha(data, ...)calc_alpha(data, ...)
data |
An |
... |
Other parameters for |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_alpha <- nem |> calc_alpha()
A alpha-class for storing alpha diversity analysis results.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_nemindex, calc_funguild,
calc_funguild2, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_alpha <- nem |> calc_alpha() show(nem_alpha)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_alpha <- nem |> calc_alpha() show(nem_alpha)
The calc_beta() is used to perform beta diversity analysis and create
beta-class. This function is only applicable to single factor
analysis, see calc_beta2 for a two-factor version of the
function.
calc_beta(data, type, .group, method, ...)calc_beta(data, type, .group, method, ...)
data |
An |
type |
Types of beta diversity analysis ( |
.group |
Treatment factors that need to be compared. |
method |
Dissimilarity index, partial match to |
... |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_pca <- nem |> calc_beta(pca, Treatments, method = "bray")
A beta-class for storing beta diversity analysis results.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_alpha, calc_nemindex, calc_funguild,
calc_funguild2, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_pcoa <- nem |> calc_beta(pcoa, Treatments, method = "bray") show(nem_pcoa) nem_nmds <- nem |> calc_beta(nmds, Treatments, method = "bray") show(nem_nmds)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_pcoa <- nem |> calc_beta(pcoa, Treatments, method = "bray") show(nem_pcoa) nem_nmds <- nem |> calc_beta(nmds, Treatments, method = "bray") show(nem_nmds)
The calc_beta2() is used to perform beta diversity analysis and create
beta2-class. This function is only applicable to two-factor factor
analysis, see calc_beta for a single factor version of the
function.
calc_beta2(data, type, .group1, .group2, method, ...)calc_beta2(data, type, .group1, .group2, method, ...)
data |
An |
type |
Types of beta diversity analysis ( |
.group1 |
Treatment factors 1 that need to be compared. |
.group2 |
Treatment factors 2 that need to be compared. |
method |
Dissimilarity index, partial match to |
... |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_pca <- nem |> calc_beta2(pca, con_crop, season, method = "bray")
A beta2-class for storing beta diversity analysis results.
Other functions in this R package for data calculations:
calc_beta, calc_compare, calc_compare2,
calc_alpha, calc_nemindex, calc_funguild,
calc_funguild2, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_pcoa <- nem |> calc_beta2(pcoa, con_crop, season, method = "bray") show(nem_pcoa) nem_nmds <- nem |> calc_beta2(nmds, con_crop, season, method = "bray") show(nem_nmds)nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_pcoa <- nem |> calc_beta2(pcoa, con_crop, season, method = "bray") show(nem_pcoa) nem_nmds <- nem |> calc_beta2(nmds, con_crop, season, method = "bray") show(nem_nmds)
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.
calc_compare(data, .group, y, method, ...)calc_compare(data, .group, y, method, ...)
data |
An |
.group |
Grouping variables (supports only two groups). |
y |
Dependent variable (numeric data). |
method |
The method of difference comparison. Such as |
... |
Other parameters for |
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)
An compare-class object.
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.
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_ttestnem <- 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
The calc_compare2 is used for multiple comparisons between different
treatments and create compare2-class. This function is only
applicable to two-factor analysis, see calc_compare for a
single factor version of the function.
calc_compare2(data, .group1, .group2, y, method, ...)calc_compare2(data, .group1, .group2, y, method, ...)
data |
An |
.group1 |
Grouping variables factor 1 (supports only two groups). |
.group2 |
Grouping variables factor 1 (supports only two groups). |
y |
Dependent variable (numeric data). |
method |
The method of difference comparison. Such as |
... |
Other parameters for |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = TTest2)
An compare2-class object.
Other functions in this R package for data calculations:
calc_beta, calc_beta2, calc_compare,
calc_alpha, calc_nemindex, calc_funguild,
calc_funguild2, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_ttest <- nem |> filter_name(meta, con_crop %in% c("Y2", "Y11")) |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = TTest2) nem_ttestnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_ttest <- nem |> filter_name(meta, con_crop %in% c("Y2", "Y11")) |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = TTest2) nem_ttest
The calc_ef() function is used to calculate the energy flow of a nematode
community. For detailed calculation method, see Wan et al. (2022): Step 1, the
fresh biomass of each nematode individuals was calculated based on the measurement
of body size or using publicly available data. Step 2, nematode metabolism (F) was
then calculated according to Ferris (2010) and van den Hoogen et al. (2019),
where Nt, Wt and mt are the number of individuals, the fresh weight and the cp class
of taxon t, respectively. Step 3, a five-node food web topology was constructed and
the feeding preferences of omnivores-carnivores on other trophic groups was assumed according
to community density. Step 4, the metabolism of each node was summed by all individual
metabolism of the respective trophic group. Step 5, we used assimilation efficiencies
(ea) of 0.25 for herbivores, 0.60 for bacterivores, 0.38 for fungivores and 0.5
for omnivores-carnivores according to Barnes et al. (2014) and De Ruiter et al. (1993).
Step 6, energy fluxes between nodes was calculated as follows: Fi = (F + L)/ea,
where L is the energy loss to higher trophic levels.
calc_ef(data, .group)calc_ef(data, .group)
data |
An |
.group |
The group variable. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_ter <- nem |> nem_index() |> calc_ef(con_crop)
An ef-class object that stores the desired visualization results.
OF, Energy flow metabolism of omnivorous predatory nematodes.
OM, Fresh biomass (ug / 100g dry soil) of omnivorous predatory nematodes.
BF, Energy flow metabolism of bacteria-feeding nematodes.
BM, Fresh biomass (ug / 100g dry soil) of omnivorous predatory nematodes.
HF, Energy flow metabolism of herbivorous nematodes.
HM, Fresh biomass (ug / 100g dry soil) of herbivorous nematodes.
FF, Energy flow metabolism of fungus-feeding nematodes.
FM, Fresh biomass (ug / 100g dry soil) of fungus-feeding nematodes.
bp, Feeding preference of predatory nematodes over bacteria-feeding nematodes.
hp, Feeding preference of predatory nematodes over herbivorous nematodes.
fp, Feeding preferences of predatory nematodes over fungivorous nematodes.
fbo, Energy flow (ug C / 100g dry soil / day) between bacteria-feeding nematodes and omnivorous predatory nematodes.
fho, Energy flow (ug C / 100g dry soil / day) between herbivorous nematodes and omnivorous predatory nematodes.
ffo, Energy flow (ug C / 100g dry soil / day) between fungus-feeding nematodes and omnivorous predatory nematodes.
frb, Energy flow (ug C / 100g dry soil / day) between basal resources and bacteria-feeding nematodes.
frh, Energy flow (ug C / 100g dry soil / day) between basal resources and herbivorous nematodes.
frf, Energy flow (ug C / 100g dry soil / day) between basal resources and fungivorous nematodes.
U, Uniformity (U) of soil nematode energetic structure (unitless, mean ± standard error) was calculated as the
ratio of the mean of summed energy flux through each energy channel to the standard deviation of these mean values.
Wan, Bingbing, et al. "Organic amendments increase the flow uniformity of energy across nematode food webs." Soil Biology and Biochemistry 170 (2022): 108695.
Ferris, H., 2010. Form and function: metabolic footprints of nematodes in the soil food web. European Journal of Soil Biology 46, 97–104.
Van Den Hoogen, Johan, et al. "Soil nematode abundance and functional group composition at a global scale." Nature 572.7768 (2019): 194-198.
Barnes, A.D., Jochum, M., Mumme, S., Haneda, N.F., Farajallah, A., Widarto, T.H., Brose, U., 2014. Consequences of tropical land use for multitrophic biodiversity and ecosystem functioning. Nature Communications 5, 1–7.
De Ruiter, P.C., Van Veen, J.A., Moore, J.C., Brussaard, L., Hunt, H.W., 1993. Calculation of nitrogen mineralization in soil food webs. Plant and Soil 157, 263–273.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_mf, calc_ter2, calc_ter,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() |> calc_ef(Treatments) nem_indexnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() |> calc_ef(Treatments) nem_index
The calc_ef2() function is used to calculate the energy flow of a nematode
community. For detailed calculation method, see Wan et al. (2022): Step 1, the
fresh biomass of each nematode individuals was calculated based on the measurement
of body size or using publicly available data. Step 2, nematode metabolism (F) was
then calculated according to Ferris (2010) and van den Hoogen et al. (2019),
where Nt, Wt and mt are the number of individuals, the fresh weight and the cp class
of taxon t, respectively. Step 3, a five-node food web topology was constructed and
the feeding preferences of omnivores-carnivores on other trophic groups was assumed according
to community density. Step 4, the metabolism of each node was summed by all individual
metabolism of the respective trophic group. Step 5, we used assimilation efficiencies
(ea) of 0.25 for herbivores, 0.60 for bacterivores, 0.38 for fungivores and 0.5
for omnivores-carnivores according to Barnes et al. (2014) and De Ruiter et al. (1993).
Step 6, energy fluxes between nodes was calculated as follows: Fi = (F + L)/ea,
where L is the energy loss to higher trophic levels.
calc_ef2(data, .group1, .group2)calc_ef2(data, .group1, .group2)
data |
An |
.group1 |
The group variable factor 1. |
.group2 |
The group variable factor 2. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_ter <- nem |> nem_index() |> calc_ef2(con_crop, season)
An ef2-class object that stores the desired visualization results.
OF, Energy flow metabolism of omnivorous predatory nematodes.
OM, Fresh biomass (ug / 100g dry soil) of omnivorous predatory nematodes.
BF, Energy flow metabolism of bacteria-feeding nematodes.
BM, Fresh biomass (ug / 100g dry soil) of omnivorous predatory nematodes.
HF, Energy flow metabolism of herbivorous nematodes.
HM, Fresh biomass (ug / 100g dry soil) of herbivorous nematodes.
FF, Energy flow metabolism of fungus-feeding nematodes.
FM, Fresh biomass (ug / 100g dry soil) of fungus-feeding nematodes.
bp, Feeding preference of predatory nematodes over bacteria-feeding nematodes.
hp, Feeding preference of predatory nematodes over herbivorous nematodes.
fp, Feeding preferences of predatory nematodes over fungivorous nematodes.
fbo, Energy flow (ug C / 100g dry soil / day) between bacteria-feeding nematodes and omnivorous predatory nematodes.
fho, Energy flow (ug C / 100g dry soil / day) between herbivorous nematodes and omnivorous predatory nematodes.
ffo, Energy flow (ug C / 100g dry soil / day) between fungus-feeding nematodes and omnivorous predatory nematodes.
frb, Energy flow (ug C / 100g dry soil / day) between basal resources and bacteria-feeding nematodes.
frh, Energy flow (ug C / 100g dry soil / day) between basal resources and herbivorous nematodes.
frf, Energy flow (ug C / 100g dry soil / day) between basal resources and fungivorous nematodes.
U, Uniformity (U) of soil nematode energetic structure (unitless, mean ± standard error) was calculated as the
ratio of the mean of summed energy flux through each energy channel to the standard deviation of these mean values.
Wan, Bingbing, et al. "Organic amendments increase the flow uniformity of energy across nematode food webs." Soil Biology and Biochemistry 170 (2022): 108695.
Ferris, H., 2010. Form and function: metabolic footprints of nematodes in the soil food web. European Journal of Soil Biology 46, 97–104.
Van Den Hoogen, Johan, et al. "Soil nematode abundance and functional group composition at a global scale." Nature 572.7768 (2019): 194-198.
Barnes, A.D., Jochum, M., Mumme, S., Haneda, N.F., Farajallah, A., Widarto, T.H., Brose, U., 2014. Consequences of tropical land use for multitrophic biodiversity and ecosystem functioning. Nature Communications 5, 1–7.
De Ruiter, P.C., Van Veen, J.A., Moore, J.C., Brussaard, L., Hunt, H.W., 1993. Calculation of nitrogen mineralization in soil food webs. Plant and Soil 157, 263–273.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_mf, calc_ter2, calc_ter,
calc_ef.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_nemindex() |> calc_ef2(con_crop, season) nem_indexnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_nemindex() |> calc_ef2(con_crop, season) nem_index
The calc_funguild() is used for nematode food web analysis and generate
funguild-class.
calc_funguild(data, .group)calc_funguild(data, .group)
data |
A |
.group |
The group variable. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_fun <- nem |> calc_funguild(con_crop)
A funguild-class object that stores the desired
visualization results.
Ferris, Howard, Tom Bongers, and Ron GM de Goede. "A framework for soil food web diagnostics: extension of the nematode faunal analysis concept." Applied soil ecology 18.1 (2001): 13-29.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild2, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() |> calc_funguild(Treatments) nem_indexnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() |> calc_funguild(Treatments) nem_index
The calc_funguild2() is used for nematode food web analysis and generate
funguild2-class.
calc_funguild2(data, .group1, .group2)calc_funguild2(data, .group1, .group2)
data |
A |
.group1 |
The group variable factor 1. |
.group2 |
The group variable factor 2. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_fun <- nem |> calc_funguild2(con_crop, season)
A funguild2-class object that stores the desired
visualization results.
Ferris, Howard, Tom Bongers, and Ron GM de Goede. "A framework for soil food web diagnostics: extension of the nematode faunal analysis concept." Applied soil ecology 18.1 (2001): 13-29.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_nemindex() |> calc_funguild2(con_crop, season) nem_indexnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_nemindex() |> calc_funguild2(con_crop, season) nem_index
The calc_lm() function is used for linear regression analysis of
easynem-class. Note: Both the horizontal and vertical coordinates of this
function must be continuous variables.
calc_lm(data, group, x, y, ...)calc_lm(data, group, x, y, ...)
data |
An |
group |
The group variable. |
x |
X-axis. |
y |
Y-axis. |
... |
Other parameters of the |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_lm <- nem |> calc_lm(con_crop, x = SOC, y = pH)
Returns an lme-class object storing the results of a
linear regression analysis.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_mf, calc_ter2, calc_ef,
calc_ef2, calc_lm2
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_alpha() |> calc_nemindex() |> calc_lm(group = Treatments, x = Chao1, y = TotalBiomass) nem_indexnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_alpha() |> calc_nemindex() |> calc_lm(group = Treatments, x = Chao1, y = TotalBiomass) nem_index
The calc_lm2() function is used for linear regression analysis of
easynem-class. Note: Both the horizontal and vertical coordinates of this
function must be continuous variables.
calc_lm2(data, group1, group2, x, y, ...)calc_lm2(data, group1, group2, x, y, ...)
data |
An |
group1 |
The group variable factor 1. |
group2 |
The group variable factor 2. |
x |
X-axis. |
y |
Y-axis. |
... |
Other parameters of the |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_lm <- nem |> calc_lm2(con_crop, season, x = SOC, y = pH)
Returns an lme2-class object storing the results of a
linear regression analysis.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_mf, calc_ter2, calc_ef,
calc_ef2, calc_lm.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_lm <- nem |> calc_lm2(con_crop, season, x = pH, y = Fe)nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_lm <- nem |> calc_lm2(con_crop, season, x = pH, y = Fe)
Metabolic footprints quantify the amplitude of Carbon utilisation by different food web components. The point in the middle of a rhombus represents the intersection of EI and SI and length of vertical and horizontal axes of the rhombus corresponds to the footprints of enrichment and structure components respectively.
calc_mf(data, .group)calc_mf(data, .group)
data |
A |
.group |
The group variable. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_fun <- nem |> calc_nemindex() |> calc_mf(con_crop)
A mf-class object that stores the desired
visualization results.
Ferris, Howard. "Form and function: metabolic footprints of nematodes in the soil food web." European Journal of Soil Biology 46.2 (2010): 97-104.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() |> calc_mf(Treatments) nem_indexnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() |> calc_mf(Treatments) nem_index
Metabolic footprints quantify the amplitude of Carbon utilisation by different food web components. The point in the middle of a rhombus represents the intersection of EI and SI and length of vertical and horizontal axes of the rhombus corresponds to the footprints of enrichment and structure components respectively.
calc_mf2(data, .group1, .group2)calc_mf2(data, .group1, .group2)
data |
A |
.group1 |
The group variable factor 1. |
.group2 |
The group variable factor 2. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_fun <- nem |> calc_nemindex() |> calc_mf2(con_crop, season)
A mf2-class object that stores the desired
visualization results.
Ferris, Howard. "Form and function: metabolic footprints of nematodes in the soil food web." European Journal of Soil Biology 46.2 (2010): 97-104.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_nemindex() |> calc_mf2(con_crop, season) nem_indexnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_nemindex() |> calc_mf2(con_crop, season) nem_index
The calc_nemindex() is used to Calculate multiple nematode ecological
indices and generate nemindex-class. The ecological indexes that
can be calculated by this function include MI, sigMI, sigMI25,
MI25, PPI, WI, NCR, CI, BI, SI,
EI, etc.
calc_nemindex(data)calc_nemindex(data)
data |
An |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_index <- nem |> calc_nemindex()
A nemindex-class for storing nematode ecological indices
analysis results.
MI, Maturity Index. Indicates environmental disturbance resulting from
perturbations (range, 1-5). Low values (<2) indicate an early (primary or secondary)
successional stage or a temporary level of increased nutrient availability.
Values close to 2 indicate a high level of disturbance with low soil food web
structure, while intermediate values (2.5–3) indicate some soil food web maturity.
High values (>3) indicate a well-structured and complex soil food web likely with
connectivity and energy flow between trophic levels.
sigMI, Sigma Maturity Index (SigmaMI). Indicates environmental disturbance
resulting from perturbations in non-agricultural soils (range, 1-5). Low values (<2)
indicate a high level of nutrient availability and minimal plant-parasitic pressure,
while values close to 2 indicate a high level of disturbance with low soil food web
structure. Intermediate values (2.5–3) indicate some soil food web maturity.
High values (>3), in turn, indicate a well-structured and complex soil food web
likely with connectivity and energy flow between trophic levels, which might include
larger plant-parasitic nematodes. This index is less sensitive to enrichment in
agricultural soils.
sigMI25, Sigma Maturity Index 2-5 (SigmaMI25). computes the MI for all
nematodes in the c-p2-5 range (Neher & Campbell, 1996). The index recognizes
that the higher c-p value plant-feeding species also provide information of
environmental stress but bears some of the burden of the SigmaMI in situations of
nutrient enrichment.
MI25, Maturity Index 2–5. Indicates Environmental disturbance resulting
from perturbations unrelated to nutrient enrichment in agricultural fields (range, 2-5).
Low values (close to 2) indicate substantial disturbance resulting from perturbations
unrelated to nutrient enrichment. High values (>3) indicate greater maturity with
minimal or no effect resulting from perturbations.
PPI, Plant-Parasitic Index. Indicates Assemblage composition of plant-parasitic
nematodes (range, 2-5). Low values (close to 2) indicate plant-parasitic nematode
assemblages dominated by small and medium-sized ectoparasites that feed on single
plant cells. Higher values indicate assemblages dominated by medium and large (semi-)
endoparasitic (e.g., Meloidogyne and Heterodera spp.) or ectoparasitic virus transmitting
nematodes (e.g., Xiphinema and Longidorus spp.).
PPI_MI, PPI/MI. The PPI/MI ratio is lower under nutrient poor conditions
than under nutrient rich conditions. It is a sensitive indicator of enrichment
in agroecosystems (Bongers & Korthals, 1995; Bongers et al., 1997).
WI, Wasilewska Index. Wasilewska Index is calculated by dividing the
sum of bacteria-feeding nematodes and fungi-feeding nematodes by the number of
herbivorous nematodes. This index is used to indicate the impact of nematode communities
on crop production. The smaller the index, the greater the negative impact of nematode
communities on crop production.
NCR, Nematode Channel Ratio. The Nematode Channel Ratio (NCR) is a parameter
used in soil ecology to assess the balance between bacterial and fungal energy
channels in the soil food web. This ratio is calculated by comparing the abundance
of bacterial-feeding nematodes to fungal-feeding nematodes. High NCR: Indicates
a bacterial-dominated energy channel. This is often found in soils with frequent
disturbance or high inputs of easily decomposable organic matter. Low NCR: Indicates
a fungal-dominated energy channel. This is commonly found in more stable, less
disturbed soils, such as forests or natural grasslands, where organic matter
decomposition is slower and more complex.
CI, Channel Index. Indicates predominant decomposition pathway of organic matter (range, 0-100).
Lower values (<50) indicate increasing decomposition dominance by bacteria, while
higher values (>50) indicate increasing decomposition dominance by fungi. Bacterial
dominance indicates the presence of rapidly decomposed organic matter, while fungal
dominated decomposition indicates the slow breakdown of more complex organic matter.
The focus on opportunistic bacterial and fungal feeders makes this a highly responsive
index, which can be used to detect alternating decomposition pathways over time.
EI, Enrichment Index. Indicates food availability and nutrient enrichment
(range, 0-100). Low (0–30), intermediate (30–60), and high (60–100) values indicate
equivalent levels of food availability (e.g., labile organic carbon) and nutrient enrichment.
SI, Structure Index. Indicates Soil food web structure and complexity,
as well as disturbance due to environmental (e.g., salinity and drought) or
anthropogenic (e.g. tillage, mining, and chemical pollution) causalities (range, 0-100).
Low (0–30), intermediate (30–60), and high (60–100) values indicate equivalent levels
of soil food web complexity. Lower values are indicative of perturbed soil food webs,
while higher values indicate a structured soil food web.
BI, Basal Index. Indicates food web structure and complexity (range, 0-100).
Low (0–30), intermediate (30–60), and high (60–100) values indicate equivalent
levels of soil perturbation. Therefore, higher values (>50) are indicative of
a depleted and damaged soil food web.
TotalBiomass, Total biomass of nematode community.
MetabolicFootprint, Metabolic Footprints. Indicates magnitude of
ecosystem functions and services fulfilled by nematode community (range, 0-infinite).
Higher metabolic footprint values are indicative of greater carbon channelling
and therefore an increased contribution to the fulfilment of soil ecosystem
functions and services. This can be considered per trophic group (e.g. bacterivore
footprint), or per component of the nematode community that indicate enrichment
(enrichment footprint) and structure (structure footprint).
EnrichmentFootprint, Enrichment Footprint.
StructureFootprint, Structure Footprint.
HerbivoreFootprint, Herbivore Footprint.
FungivoreFootprint, Fungivore Footprint
BacterivoreFootprint, Bacterivore Footprint.
PrOmFootprint, Metabolic footprint of an omnivorous predatory nematode.
Numbers, Number of nematodes.
CAssimilated, Carbon assimilated by nematodes.
CRespired, Carbon consumed by nematode respiration.
http://nemaplex.ucdavis.edu/Ecology/Indices_of_ecosystem_condition.html
Du Preez G, Daneel M, De Goede R, et al. Nematode-based indices in soil ecology: Application, utility, and future directions. Soil Biology and Biochemistry, 2022, 169: 108640.
Bongers T. The maturity index: an ecological measure of environmental disturbance based on nematode species composition. Oecologia, 1990, 83: 14-19.
Bongers T, Goede R G N, Korthals G W, et al. Proposed changes of cp classification for nematodes. 1995.
Ferris, H. O. W. A. R. D., and Tom Bongers. "Indices developed specifically for analysis of nematode assemblages." Nematodes as environmental indicators. Wallingford UK: CABI, 2009. 124-145.
Goede, RGM de, T. Bongers, and C. H. Ettema. "Graphical presentation and interpretation of nematode community structure: cp triangles." (1993): 743-750.
Ferris, Howard, Tom Bongers, and Ron GM de Goede. "A framework for soil food web diagnostics: extension of the nematode faunal analysis concept." Applied soil ecology 18.1 (2001): 13-29.
Ferris, Howard. "Form and function: metabolic footprints of nematodes in the soil food web." European Journal of Soil Biology 46.2 (2010): 97-104.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_funguild,
calc_funguild2, calc_mf, calc_mf2,
calc_ter, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() show(nem_index)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_nemindex() show(nem_index)
The calc_ter() function is used to perform ternary analysis on nematode
feeding (Relative biomass of bacteria-feeding nematodes, fungi-feeding nematodes,
and herbivorous nematodes) or cp values (Relative abundance of cp1 nematodes,
cp2 nematodes, and cp3-5 nematodes).
calc_ter(data, .group)calc_ter(data, .group)
data |
An |
.group |
The group variable. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_ter <- nem |> calc_ter(con_crop)
A ter-class object that stores the desired
visualization results.
Goede, RGM de, T. Bongers, and C. H. Ettema. "Graphical presentation and interpretation of nematode community structure: cp triangles." (1993): 743-750.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_mf, calc_ter2, calc_ef,
calc_ef2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_ter(Treatments) nem_indexnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_index <- nem |> calc_ter(Treatments) nem_index
The calc_ter2() function is used to perform ternary analysis on nematode
feeding (Relative biomass of bacteria-feeding nematodes, fungi-feeding nematodes,
and herbivorous nematodes) or cp values (Relative abundance of cp1 nematodes,
cp2 nematodes, and cp3-5 nematodes).
calc_ter2(data, .group1, .group2)calc_ter2(data, .group1, .group2)
data |
An |
.group1 |
The group variable factor 1. |
.group2 |
The group variable factor 2. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_ter <- nem |> calc_ter2(con_crop, season)
A ter2-class object that stores the desired visualization results.
Goede, RGM de, T. Bongers, and C. H. Ettema. "Graphical presentation and interpretation of nematode community structure: cp triangles." (1993): 743-750.
Other functions in this R package for data calculations:
calc_beta2, calc_compare, calc_compare2,
calc_beta, calc_alpha, calc_nemindex,
calc_funguild, calc_funguild2, calc_mf2,
calc_mf, calc_ter, calc_ef,
calc_ef2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_ter2(con_crop, season) nem_indexnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_index <- nem |> calc_ter2(con_crop, season) nem_index
compare-class is used to store the results of multiple comparisons results,
including results for drawing and comparing differences between groups.
Users can construct a compare-class through calc_compare,
which can then be connected to nem_plot to visualize the results.
metaA data frame storing basic elements for visualization.
resultA data frame of multiple comparisons results.
tempA character vector of the difference comparison.
The constructor, calc_compare; Class for storing two-factor
multiple comparisons analysis, compare2-class; Visualization function,
nem_plot.
compare2-class is used to store the results of multiple comparisons results,
including results for drawing and comparing differences between groups.
Users can construct a compare2-class through calc_compare2,
which can then be connected to nem_plot to visualize the results.
metaA data frame storing basic elements for visualization.
resultA data frame of multiple comparisons results.
tempA character vector of the difference comparison.
The constructor, calc_compare2; Class for storing single factor
multiple comparisons analysis, compare-class; Visualization function,
nem_plot.
This function returns the path to the example files.
easynem_example(path = NULL)easynem_example(path = NULL)
path |
The path to the example files. |
The path to the example files.
Integrate the nematode abundance table, nematode classification table, and
experimental design table into an easynem-class, which makes it easier to
filter and manage nematode data, and easier to link to the nematode database
and conduct subsequent analysis.
Users can read data via read_nem or read_nem2.
When there are missing slots in easynem, the system will issue a warning, but
this will not affect subsequent analysis.
tabA single object of nematode abundance table.
taxA single object of nematode classification table.
metaA single object of experimental design table.
The constructor, read_nem for reading csv files and
read_nem2 for reading tibble type data.
The ef-class is an extension of the easynem-class to store
the results of nematode energy flow analysis.
resultA data frame for storing the results of energy flow analysis.
The constructor, calc_ef; Visualization function, nem_plot.
The ef2-class is an extension of the easynem-class to store
the results of nematode energy flow analysis.
resultA data frame for storing the results of energy flow analysis.
The constructor, calc_ef2; Visualization function, nem_plot.
The filter_name() is the extension of the filter
function for easynem type data, used to subset an easynem object, retaining
all rows that satisfy your conditions. This function selects one of tab,
tax or meta in easynem for filtering. When any of the three
components changes, the related components will also change accordingly. To be
retained, the row must produce a value of TRUE for all conditions.
filter_name(data, target, ...)filter_name(data, target, ...)
data |
An |
target |
|
... |
Other parameters of the |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_filter <- nem |> filter_name(target = meta, season == "Summer")
An easynem-class data. The rows of each component are a
subset of the input, but appear in the same order and the columns of each
component are not modified.
Other functions in this package for filtering and transforming data sets:
filter_num, trans_formula, trans_formula_v,
trans_name, trans_norm, trans_rare,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_filter <- nem |> filter_name(target = meta, Treatments == "C4") show(nem_filter)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_filter <- nem |> filter_name(target = meta, Treatments == "C4") show(nem_filter)
The filter_num() is used to filter the rows of the easynem tab
by abundance or discovery rate. If num>1, filter by abundance, num
is the lowest abundance of the tab; if num<1, filter by discovery
rate, num is the lowest discovery rate of the tab.
filter_num(data, num)filter_num(data, num)
data |
An |
num |
Filter threshold value. If |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_filter <- nem |> filter_num(target = meta, num = 0.85)
nem_filter <- nem |> filter_num(target = meta, num = 500)
An easynem-class data.The results of tab, tax,
and meta are the retention values after filtering the tab by abundance
or discovery rate.
Other functions in this package for filtering and transforming data sets:
filter_name, trans_formula, trans_formula_v,
trans_name, trans_norm, trans_rare,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_filter <- nem |> filter_num(num = 0.9) show(nem_filter) nem_filter <- nem |> filter_num(num = 1000) show(nem_filter)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_filter <- nem |> filter_num(num = 0.9) show(nem_filter) nem_filter <- nem |> filter_num(num = 1000) show(nem_filter)
The funguild-class is used to store the results of nematode functional guild analysis.
resultA data frame of storing computational results of nematode functional guild analysis.
The constructor, calc_funguild; Visualization function, nem_plot.
The funguild2-class is used to store the results of nematode functional guild analysis.
resultA data frame of storing computational results of nematode functional guild analysis.
The constructor, calc_funguild2; Visualization function, nem_plot.
Automatically enclose points in a polygon
geom_encircle( mapping = NULL, data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ... )geom_encircle( mapping = NULL, data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ... )
mapping |
mapping |
data |
data |
stat |
stat |
position |
position |
na.rm |
na.rm |
show.legend |
show.legend |
inherit.aes |
inherit.aes |
... |
dots |
A sample of the output from geom_encircle()
adds a circle around the specified points
Ben Bolker
d <- data.frame(x=c(1,1,2),y=c(1,2,2)*100) gg <- ggplot2::ggplot(d,ggplot2::aes(x,y)) gg <- gg + ggplot2::scale_x_continuous(expand=c(0.5,1)) gg <- gg + ggplot2::scale_y_continuous(expand=c(0.5,1)) gg + geom_encircle(s_shape=1, expand=0) + ggplot2::geom_point() gg + geom_encircle(s_shape=1, expand=0.1, colour="red") + ggplot2::geom_point() gg + geom_encircle(s_shape=0.5, expand=0.1, colour="purple") + ggplot2::geom_point() gg + geom_encircle(data=subset(d, x==1), colour="blue", spread=0.02) + ggplot2::geom_point() gg +geom_encircle(data=subset(d, x==2), colour="cyan", spread=0.04) + ggplot2::geom_point() gg <- ggplot2::ggplot(ggplot2::mpg, ggplot2::aes(displ, hwy)) gg + geom_encircle(data=subset(ggplot2::mpg, hwy>40)) + ggplot2::geom_point() gg + geom_encircle(ggplot2::aes(group=manufacturer)) + ggplot2::geom_point() gg + geom_encircle(ggplot2::aes(group=manufacturer,fill=manufacturer),alpha=0.4)+ ggplot2::geom_point() gg + geom_encircle(ggplot2::aes(group=manufacturer,colour=manufacturer))+ ggplot2::geom_point() ss <- subset(ggplot2::mpg,hwy>31 & displ<2) gg + geom_encircle(data=ss, colour="blue", s_shape=0.9, expand=0.07) + ggplot2::geom_point() + ggplot2::geom_point(data=ss, colour="blue")d <- data.frame(x=c(1,1,2),y=c(1,2,2)*100) gg <- ggplot2::ggplot(d,ggplot2::aes(x,y)) gg <- gg + ggplot2::scale_x_continuous(expand=c(0.5,1)) gg <- gg + ggplot2::scale_y_continuous(expand=c(0.5,1)) gg + geom_encircle(s_shape=1, expand=0) + ggplot2::geom_point() gg + geom_encircle(s_shape=1, expand=0.1, colour="red") + ggplot2::geom_point() gg + geom_encircle(s_shape=0.5, expand=0.1, colour="purple") + ggplot2::geom_point() gg + geom_encircle(data=subset(d, x==1), colour="blue", spread=0.02) + ggplot2::geom_point() gg +geom_encircle(data=subset(d, x==2), colour="cyan", spread=0.04) + ggplot2::geom_point() gg <- ggplot2::ggplot(ggplot2::mpg, ggplot2::aes(displ, hwy)) gg + geom_encircle(data=subset(ggplot2::mpg, hwy>40)) + ggplot2::geom_point() gg + geom_encircle(ggplot2::aes(group=manufacturer)) + ggplot2::geom_point() gg + geom_encircle(ggplot2::aes(group=manufacturer,fill=manufacturer),alpha=0.4)+ ggplot2::geom_point() gg + geom_encircle(ggplot2::aes(group=manufacturer,colour=manufacturer))+ ggplot2::geom_point() ss <- subset(ggplot2::mpg,hwy>31 & displ<2) gg + geom_encircle(data=ss, colour="blue", s_shape=0.9, expand=0.07) + ggplot2::geom_point() + ggplot2::geom_point(data=ss, colour="blue")
The HSD() is used to Compute Tukey Honest Significant Differences for
grouped data and create compare-class. This function is only
applicable to single factor analysis, see HSD2 for a
two factor version of the function.
HSD(data, .group, y, ...)HSD(data, .group, y, ...)
data |
An |
.group |
Grouping variables. |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = HSD)
An compare-class object.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest2, KruskalTest, LSD2, LSD,
HSD2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> calc_compare(.group = Treatments, y = Mesorhabditis, method = HSD) nem_testnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> calc_compare(.group = Treatments, y = Mesorhabditis, method = HSD) nem_test
The HSD2() is used to Compute Tukey Honest Significant Differences for
grouped data and create compare2-class. This function is only
applicable to two-factor analysis, see HSD for a single factor
version of the function.
HSD2(data, .group1, .group2, y, ...)HSD2(data, .group1, .group2, y, ...)
data |
An |
.group1 |
Grouping variables factor 1. |
.group2 |
Grouping variables factor 2. |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare2 function:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2)
An compare2-class object.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest2, KruskalTest, LSD2, LSD,
HSD.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2) nem_testnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2) nem_test
The KruskalTest() is used to perform Kruskal-Wallis test for
grouped data and create compare-class. This function is only
applicable to single factor analysis, see KruskalTest2 for a
two factor version of the function.
KruskalTest(data, .group, y, exact=FALSE, sort=TRUE, .method=c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"), ...)KruskalTest(data, .group, y, exact=FALSE, sort=TRUE, .method=c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"), ...)
data |
An |
.group |
Grouping variables. |
y |
Dependent variable (numeric data). |
exact |
logical. If TRUE, calculate exact Wilcoxon tests. Default |
sort |
logical. If TRUE, sort groups by median dependent variable values.
Default |
.method |
method for correcting p-values for multiple comparisons. |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = KruskalTest)
An compare-class object.
R in Action: Data Analysis and Graphics with R, Second Edition by Robert I. Kabacoff, published by Manning Publications. 178 South Hill Drive, Westampton, NJ 08060 USA. Copyright 2015 by Manning Publications.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest2, LSD, LSD2, HSD,
HSD2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> calc_compare(.group = Treatments, y = Mesorhabditis, method = KruskalTest) nem_testnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> calc_compare(.group = Treatments, y = Mesorhabditis, method = KruskalTest) nem_test
The KruskalTest2() is used to perform Kruskal-Wallis test for
grouped data and create compare2-class. This function is only
applicable to two-factor analysis, see KruskalTest for a
single factor version of the function.
KruskalTest2(data, .group1, .group2, y, p.adj = "none", ...)KruskalTest2(data, .group1, .group2, y, p.adj = "none", ...)
data |
An |
.group1 |
Grouping variables factor 1. |
.group2 |
Grouping variables factor 2. |
y |
Dependent variable (numeric data). |
p.adj |
method for correcting p-values for multiple comparisons. Default |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare2 function:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = KruskalTest)
An compare2-class object.
R in Action: Data Analysis and Graphics with R, Second Edition by Robert I. Kabacoff, published by Manning Publications. 178 South Hill Drive, Westampton, NJ 08060 USA. Copyright 2015 by Manning Publications.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest, LSD, LSD2, HSD,
HSD2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = KruskalTest2) nem_testnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = KruskalTest2) nem_test
The lme-class is used to store the results of linear regression analysis.
metaStores the data frame for plotting.
resultA data frame for storing the results of linear regression analysis.
The constructor, calc_lm; Visualization function, nem_plot.
The lme2-class is used to store the results of linear regression analysis.
metaStores the data frame for plotting
resultA data frame for storing the results of linear regression analysis.
The constructor, calc_lm2; Visualization function, nem_plot.
The LSD() is used to perform "Least significant difference" for
grouped data and create compare-class. This function is only
applicable to single factor analysis, see LSD2 for a
two factor version of the function.
LSD(data, .group, y, ...)LSD(data, .group, y, ...)
data |
An |
.group |
Grouping variables. |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = LSD)
An compare-class object.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest2, KruskalTest, LSD2, HSD,
HSD2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> calc_compare(.group = Treatments, y = Mesorhabditis, method = LSD) nem_testnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> calc_compare(.group = Treatments, y = Mesorhabditis, method = LSD) nem_test
The LSD2() is used to perform "Least significant difference" for
grouped data and create compare2-class. This function is only
applicable to two-factor analysis, see LSD for a
single factor version of the function.
LSD2(data, .group1, .group2, y, ...)LSD2(data, .group1, .group2, y, ...)
data |
An |
.group1 |
Grouping variables factor 1. |
.group2 |
Grouping variables factor 2. |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
To facilitate code interpretation, It is recommended to use this function in
conjunction with the calc_compare2 function:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2)
An compare2-class object.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, WilcoxTest,
KruskalTest2, KruskalTest, LSD, HSD,
HSD2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2) nem_testnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2) nem_test
The mf-class is used to store the results of nematode metabolic footprints analysis.
resultA data frame for storing the results of metabolic footprinting analysis.
The constructor, calc_mf; Visualization function, nem_plot.
The mf2-class is used to store the results of nematode metabolic footprints analysis.
resultA data frame for storing the results of metabolic footprinting analysis.
The constructor, calc_mf2; Visualization function, nem_plot.
For microbial or nematode community calculations.
nem_calc(data, f, ...)nem_calc(data, f, ...)
data |
easynem type data. |
f |
Function parameters for microbial or nematode community calculations. |
... |
Other parameters. |
easynem or other data types.
This function provides a visual interface for retrieving basic data of nematodes. The database used is from http://nemaplex.ucdavis.edu/Ecology/EcophysiologyParms/EcoParameterMenu.html
nem_database()nem_database()
A web interface
http://nemaplex.ucdavis.edu/Ecology/EcophysiologyParms/EcoParameterMenu.html
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.
nem_plot(object, ...)nem_plot(object, ...)
object |
|
... |
Other parameters to be expanded. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_beta(pca, Treatments, method = "bray") |> nem_plot()
A plot object. Typically a ggplot object for most classes,
or a recordedplot object for ter-class and
ter2-class ternary plots.
The nem_plot function is generalized to the beta-class
and is used to visualize the single-factor beta diversity results.
## S4 method for signature 'beta' nem_plot(object, level = 0.6, type = 1, ...)## S4 method for signature 'beta' nem_plot(object, level = 0.6, type = 1, ...)
object |
A |
level |
Used to adjust the size of the confidence ellipse. Default
|
type |
Method used to adjust the display of scatter area. |
... |
Other parameters to be expanded. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_beta(pca, Treatments, method = "bray") |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_beta(pcoa, Treatments, method = "bray") |> nem_plot(level = 0) nem_plot nem_plot <- nem |> calc_beta(nmds, Treatments, method = "bray") |> nem_plot(type = 2) nem_plotnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_beta(pcoa, Treatments, method = "bray") |> nem_plot(level = 0) nem_plot nem_plot <- nem |> calc_beta(nmds, Treatments, method = "bray") |> nem_plot(type = 2) nem_plot
The nem_plot function is generalized to the beta2-class
and is used to visualize the two-factor beta diversity results.
## S4 method for signature 'beta2' nem_plot(object, level = 0.6, type = 1, ...)## S4 method for signature 'beta2' nem_plot(object, level = 0.6, type = 1, ...)
object |
A |
level |
Used to adjust the size of the confidence ellipse. Default
|
type |
Method used to adjust the display of scatter area. |
... |
Other parameters to be expanded. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_beta2(pca, con_crop, season, method = "bray") |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_beta2(pcoa, con_crop, season, method = "bray") |> nem_plot(level = 0) nem_plot nem_plot <- nem |> calc_beta2(nmds, con_crop, season, method = "bray") |> nem_plot(type = 2) nem_plotnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_beta2(pcoa, con_crop, season, method = "bray") |> nem_plot(level = 0) nem_plot nem_plot <- nem |> calc_beta2(nmds, con_crop, season, method = "bray") |> nem_plot(type = 2) nem_plot
The nem_plot function is generalized to the compare-class
and is used to visualize the results of single-factor multiple comparisons.
## S4 method for signature 'compare' nem_plot(object, type = 1, add, ...)## S4 method for signature 'compare' nem_plot(object, type = 1, add, ...)
object |
A |
type |
|
add |
Add standard deviation or standard error (only used when drawing a bar plot). |
... |
Other parameters to be expanded. |
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()
An gg or ggplot object.
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.
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_plotnem <- 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
The nem_plot function is generalized to the compare2-class
and is used to visualize the results of two-factor multiple comparisons.
## S4 method for signature 'compare2' nem_plot(object, type1 = 1, type2 = 1, add, ...)## S4 method for signature 'compare2' nem_plot(object, type1 = 1, type2 = 1, add, ...)
object |
A |
type1 |
|
type2 |
|
add |
Add standard deviation or standard error (only used when drawing a bar plot). |
... |
Other parameters to be expanded. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD) |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2) |> nem_plot(type2 = 2) nem_plot nem_plot <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2) |> nem_plot(type1 = 2, type2 = 2, add = "mean_sd") nem_plotnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = LSD2) |> nem_plot(type2 = 2) nem_plot nem_plot <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = HSD2) |> nem_plot(type1 = 2, type2 = 2, add = "mean_sd") nem_plot
The nem_plot function is generalized to the ef-class
and is used to visualize the energy structure of nematode communities. a five-node
food web was constructed with bacterivores, fungivores and herbivores receiving
energy from basal resources (R), omnivores-carnivores receiving energy from other
nodes. Numbers along the lines represented energy flux (ug C / 100 g dry soil / day).
The size of nodes corresponds to the fresh biomass (ug / 100 g dry soil).
Uniformity (U) of soil nematode energetic structure (unitless, mean ± standard error)
was calculated as the ratio of the mean of summed energy flux through each
energy channel to the standard deviation of these mean values.
## S4 method for signature 'ef' nem_plot(object)## S4 method for signature 'ef' nem_plot(object)
object |
A |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_nemindex() |> calc_ef(Treatments) |> nem_plot()
An gg or ggplot object.
Wan, Bingbing, et al. "Organic amendments increase the flow uniformity of energy across nematode food webs." Soil Biology and Biochemistry 170 (2022): 108695.
Ferris, H., 2010. Form and function: metabolic footprints of nematodes in the soil food web. European Journal of Soil Biology 46, 97–104.
Van Den Hoogen, Johan, et al. "Soil nematode abundance and functional group composition at a global scale." Nature 572.7768 (2019): 194-198.
Barnes, A.D., Jochum, M., Mumme, S., Haneda, N.F., Farajallah, A., Widarto, T.H., Brose, U., 2014. Consequences of tropical land use for multitrophic biodiversity and ecosystem functioning. Nature Communications 5, 1–7.
De Ruiter, P.C., Van Veen, J.A., Moore, J.C., Brussaard, L., Hunt, H.W., 1993. Calculation of nitrogen mineralization in soil food webs. Plant and Soil 157, 263–273.
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.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_nemindex() |> calc_ef(Treatments) |> nem_plot() nem_plotnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_nemindex() |> calc_ef(Treatments) |> nem_plot() nem_plot
The nem_plot function is generalized to the ef2-class
and is used to visualize the energy structure of nematode communities. a five-node
food web was constructed with bacterivores, fungivores and herbivores receiving
energy from basal resources (R), omnivores-carnivores receiving energy from other
nodes. Numbers along the lines represented energy flux (ug C / 100 g dry soil / day).
The size of nodes corresponds to the fresh biomass (ug / 100 g dry soil).
Uniformity (U) of soil nematode energetic structure (unitless, mean ± standard error)
was calculated as the ratio of the mean of summed energy flux through each
energy channel to the standard deviation of these mean values.
## S4 method for signature 'ef2' nem_plot(object)## S4 method for signature 'ef2' nem_plot(object)
object |
A |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_nemindex() |> calc_ef2(con_crop, season) |> nem_plot()
An gg or ggplot object.
Wan, Bingbing, et al. "Organic amendments increase the flow uniformity of energy across nematode food webs." Soil Biology and Biochemistry 170 (2022): 108695.
Ferris, H., 2010. Form and function: metabolic footprints of nematodes in the soil food web. European Journal of Soil Biology 46, 97–104.
Van Den Hoogen, Johan, et al. "Soil nematode abundance and functional group composition at a global scale." Nature 572.7768 (2019): 194-198.
Barnes, A.D., Jochum, M., Mumme, S., Haneda, N.F., Farajallah, A., Widarto, T.H., Brose, U., 2014. Consequences of tropical land use for multitrophic biodiversity and ecosystem functioning. Nature Communications 5, 1–7.
De Ruiter, P.C., Van Veen, J.A., Moore, J.C., Brussaard, L., Hunt, H.W., 1993. Calculation of nitrogen mineralization in soil food webs. Plant and Soil 157, 263–273.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_nemindex() |> calc_ef2(con_crop, season) |> nem_plot() nem_plotnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_nemindex() |> calc_ef2(con_crop, season) |> nem_plot() nem_plot
The nem_plot function is generalized to the funguild-class
and is used to visualize the nematode functional guild data.
## S4 method for signature 'funguild' nem_plot(object)## S4 method for signature 'funguild' nem_plot(object)
object |
A |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_nemindex() |> calc_funguild(Treatments) |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_nemindex() |> calc_funguild(Treatments) |> nem_plot() nem_plotnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_nemindex() |> calc_funguild(Treatments) |> nem_plot() nem_plot
The nem_plot function is generalized to the funguild2-class
and is used to visualize the nematode functional guild data.
## S4 method for signature 'funguild2' nem_plot(object)## S4 method for signature 'funguild2' nem_plot(object)
object |
A |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_nemindex() |> calc_funguild2(con_crop, season) |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_nemindex() |> calc_funguild2(con_crop, season) |> nem_plot() nem_plotnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_nemindex() |> calc_funguild2(con_crop, season) |> nem_plot() nem_plot
The nem_plot function is generalized to the lme-class
and is used to visualize the results of linear regression.
## S4 method for signature 'lme' nem_plot(object, ...)## S4 method for signature 'lme' nem_plot(object, ...)
object |
A |
... |
Other parameters of |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_lm(Treatments, Chao1, TotalBiomass) |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_alpha() |> calc_nemindex() |> calc_lm(group = Treatments, x = Chao1, y = TotalBiomass) |> nem_plot() nem_plotnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_alpha() |> calc_nemindex() |> calc_lm(group = Treatments, x = Chao1, y = TotalBiomass) |> nem_plot() nem_plot
The nem_plot function is generalized to the lme2-class
and is used to visualize the results of linear regression.
## S4 method for signature 'lme2' nem_plot(object, ...)## S4 method for signature 'lme2' nem_plot(object, ...)
object |
A |
... |
Other parameters of |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_lm2(con_crop, season, x = SOC, y = pH) |> nem_plot()
An gg or ggplot object.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_lm <- nem |> calc_lm2(con_crop, season, x = pH, y = Fe) |> nem_plot() nem_lmnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_lm <- nem |> calc_lm2(con_crop, season, x = pH, y = Fe) |> nem_plot() nem_lm
The nem_plot function is generalized to the mf-class
and is used to visualize the metabolic footprint of nematode communities. Metabolic
footprints quantify the amplitude of Carbon utilisation by different food web
components. The point in the middle of a rhombus represents the intersection
of EI and SI and length of vertical and horizontal axes of the rhombus corresponds
to the footprints of enrichment and structure components respectively.
## S4 method for signature 'mf' nem_plot(object, kei = 1, ksi = 1)## S4 method for signature 'mf' nem_plot(object, kei = 1, ksi = 1)
object |
A |
kei |
Adjust the width of the diamond, default |
ksi |
Adjust the length of the diamond, default |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_nemindex() |> calc_mf(Treatments) |> nem_plot()
An gg or ggplot object.
Ferris, Howard. "Form and function: metabolic footprints of nematodes in the soil food web." European Journal of Soil Biology 46.2 (2010): 97-104.
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.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_nemindex() |> calc_mf(Treatments) |> nem_plot(kei = 30, ksi = 20) nem_plotnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_plot <- nem |> calc_nemindex() |> calc_mf(Treatments) |> nem_plot(kei = 30, ksi = 20) nem_plot
The nem_plot function is generalized to the mf2-class
and is used to visualize the metabolic footprint of nematode communities. Metabolic
footprints quantify the amplitude of Carbon utilisation by different food web
components. The point in the middle of a rhombus represents the intersection
of EI and SI and length of vertical and horizontal axes of the rhombus corresponds
to the footprints of enrichment and structure components respectively.
## S4 method for signature 'mf2' nem_plot(object, kei = 1, ksi = 1)## S4 method for signature 'mf2' nem_plot(object, kei = 1, ksi = 1)
object |
A |
kei |
Adjust the width of the diamond, default |
ksi |
Adjust the length of the diamond, default |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_nemindex() |> calc_mf2(con_crop, season) |> nem_plot()
An gg or ggplot object.
Ferris, Howard. "Form and function: metabolic footprints of nematodes in the soil food web." European Journal of Soil Biology 46.2 (2010): 97-104.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_nemindex() |> calc_mf2(con_crop, season) |> nem_plot(kei = 35, ksi = 35) nem_plotnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_nemindex() |> calc_mf2(con_crop, season) |> nem_plot(kei = 35, ksi = 35) nem_plot
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.
## S4 method for signature 'ter' nem_plot(object, type, point_size = 1, legend_cex = 0.9, ...)## S4 method for signature 'ter' nem_plot(object, type, point_size = 1, legend_cex = 0.9, ...)
object |
A |
type |
Visualize the nematodes by their |
point_size |
Size of the points. Default is 1. |
legend_cex |
Size of the legend text. Default is 0.9 |
... |
Additional parameters passed to |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_ter(Treatments) |> nem_plot()
A recordedplot object from Ternary::TernaryPlot.
Goede, RGM de, T. Bongers, and C. H. Ettema. "Graphical presentation and interpretation of nematode community structure: cp triangles." (1993): 743-750.
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.
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_plotnem <- 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
The nem_plot function is generalized to the ter2-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.
## S4 method for signature 'ter2' nem_plot(object, type, point_size = 1, legend_cex = 0.9, ...)## S4 method for signature 'ter2' nem_plot(object, type, point_size = 1, legend_cex = 0.9, ...)
object |
A |
type |
Visualize the nematodes by their |
point_size |
Size of the points. Default is 1. |
legend_cex |
Size of the legend text. Default is 0.9 |
... |
Additional parameters passed to |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_plot <- nem |> calc_ter2(con_crop, season) |> nem_plot()
A recordedplot object from Ternary::TernaryPlot.
Goede, RGM de, T. Bongers, and C. H. Ettema. "Graphical presentation and interpretation of nematode community structure: cp triangles." (1993): 743-750.
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.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_ter2(con_crop, season) |> nem_plot(type = feeding) nem_plot nem_plot <- nem |> calc_ter2(con_crop, season) |> nem_plot(type = cp) nem_plotnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_plot <- nem |> calc_ter2(con_crop, season) |> nem_plot(type = feeding) nem_plot nem_plot <- nem |> calc_ter2(con_crop, season) |> nem_plot(type = cp) nem_plot
Used to convert and filter easynem type data.
nem_trans(data, f, ...)nem_trans(data, f, ...)
data |
easynem type data. |
f |
Function parameters for data filtering and transformation. |
... |
Other parameters. |
An easynem object.
The nemindex-class is an extension of the easynem-class to store
the results of nematode ecological index calculations.
resultThe calculation results of storage nematode ecological index.
The constructor, calc_nemindex; Visualization function, nem_plot.
Experimental design table of "Responses of soil nematode abundance and food web to cover crops in a kiwifruit orchard". The variables are as follows:
nemmetanemmeta
A tibble with 12 rows and 2 variables:
IDs of different observations, corresponding to the column names of nemtab
Diversity of cover crops in different observations: CK has no cover crops, C2 has two cover crops, C4 has four cover crops, and C8 has eight cover crops
This dataset referenced from "Li Q-m, Qi X-X, Zhang H-f, Zhang Y-j, Liu H-m, Zhao J-n, Yang D and Wang H (2023) Responses of soil nematode abundance and food web to cover crops in a kiwifruit orchard. Front. Plant Sci. 14:1173157. doi: 10.3389/fpls.2023.1173157"
data(nemmeta) head(nemmeta)data(nemmeta) head(nemmeta)
Abundance (individuals / 100 g dry soil) of nematodes functional guilds under different cover crop diversity treatments. The variables are as follows:
nemtabnemtab
A tibble with 46 rows and 13 variables (The numbers after _ in the columns represent the replicates of each treatment):
Taxonomic ID of nematodes
No cover crop
Two cover crop species
Four cover crop species
Eight cover crop species
This dataset referenced from "Li Q-m, Qi X-X, Zhang H-f, Zhang Y-j, Liu H-m, Zhao J-n, Yang D and Wang H (2023) Responses of soil nematode abundance and food web to cover crops in a kiwifruit orchard. Front. Plant Sci. 14:1173157. doi: 10.3389/fpls.2023.1173157"
data(nemtab) head(nemtab)data(nemtab) head(nemtab)
Nematode taxonomy table corresponding to the nematode taxonomy ID in the nematode abundance table. The first column of this table corresponds to the first column in nemtab. If calculations related to nematode communities are to be performed, the taxonomy table should be accurate to at least the family and genus level. The variables are as follows:
nemtaxnemtax
A tibble with 46 rows and 5 variables:
Taxonomic ID of nematodes.This column corresponds to the first column of nemtab and cannot have duplicate values.
Classification of nematodes at the kingdom level.
Classification of nematodes at the Phylum level.When reading in data, this R package will determine whether the table is a nematode classification table based on whether the Phylum column in the classification table contains Nematoda. Therefore, if you want to use this package to analyze the nematode community structure, the Phylum in the classification table must be Nematoda, otherwise the read-in data will not be automatically associated with the nematode database.
Classification of nematodes at the Family level.
Classification of nematodes at the Genus level.
This dataset referenced from "Li Q-m, Qi X-X, Zhang H-f, Zhang Y-j, Liu H-m, Zhao J-n, Yang D and Wang H (2023) Responses of soil nematode abundance and food web to cover crops in a kiwifruit orchard. Front. Plant Sci. 14:1173157. doi: 10.3389/fpls.2023.1173157"
data(nemtax) head(nemtax)data(nemtax) head(nemtax)
Meta attributes of easynem grouping factors in order to rearrangement.
order_factor(data, group, order)order_factor(data, group, order)
data |
easynem type data. |
group |
Selection of meta columns. |
order |
Order of factors. |
An easynem object.
read_nem() is a constructor method. This is the main method suggested
for constructing an experiment-level (easynem-class) object
from its component data (component data: tab, tax, meta).
read_nem(tab = 0, tax = 0, meta = 0, ...)read_nem(tab = 0, tax = 0, meta = 0, ...)
tab |
Nematode abundance table. |
tax |
Nematode abundance table. |
meta |
Experimental design table. |
... |
Other default parameters for |
An easynem object. The components in the class are interconnected to facilitate the subsequent screening and management of nematode data. When this class is generated, it will automatically check whether there is nematode information in the species classification table. If not, it will not be associated with the nematode database.
easynem <- read_nem(tab = easynem_example("nemtab.csv"), tax = easynem_example("nemtax.csv"), meta = easynem_example("nemmeta.csv")) show(easynem)easynem <- read_nem(tab = easynem_example("nemtab.csv"), tax = easynem_example("nemtax.csv"), meta = easynem_example("nemmeta.csv")) show(easynem)
read_nem2() is a constructor method. This is the main method suggested
for constructing an experiment-level (easynem-class) object
from its tibble type object (component data: tab, tax, meta).
read_nem2(tab = 0, tax = 0, meta = 0, ...)read_nem2(tab = 0, tax = 0, meta = 0, ...)
tab |
Nematode abundance table. |
tax |
Nematode abundance table. |
meta |
Experimental design table. |
... |
Other default parameters for |
An easynem object. The components in the class are interconnected to facilitate the subsequent screening and management of nematode data. When this class is generated, it will automatically check whether there is nematode information in the species classification table. If not, it will not be associated with the nematode database.
easynem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) show(easynem)easynem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) show(easynem)
The ter-class is used to store the results of nematode ternary analysis.
resultA data frame for storing the results of ternary analysis.
The constructor, calc_ter; Visualization function, nem_plot.
The ter2-class is used to store the results of nematode ternary analysis.
resultA data frame for storing the results of ternary analysis.
The constructor, calc_ter2; Visualization function, nem_plot.
The trans_combine() is used for the special case of merging columns in
easynem's meta. For example, Cp35% (the sum of percentages from Cp3
to Cp5) is often used in nematode community analysis. This function can
quickly merge Cp3 to Cp5.
trans_combine(data, col)trans_combine(data, col)
data |
An |
col |
The name of the column to be summed. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_trans <- nem |> trans_combine(c("3", "4", "5"))
An easynem-class data.
Other functions in this package for filtering and transforming data sets:
filter_name, trans_formula, trans_formula_v,
trans_name, filter_num, trans_norm,
trans_rare
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_name(cp_value) |> trans_norm(method = percent) |> trans_combine(c("3", "4", "5")) show(nem_trans) nem_trans@meta$`3_4_5`nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_name(cp_value) |> trans_norm(method = percent) |> trans_combine(c("3", "4", "5")) show(nem_trans) nem_trans@meta$`3_4_5`
The trans_formula() is used to convert the formula of easynem meta.
Formula transformation is sometimes necessary in nematode community analysis.
For example, to ensure that the data is normally distributed, it is often
necessary to perform ln(x+1) transformation or other forms of formula
transformation on nematode abundance. This function only works on a single
variable. For a vectorized variant of this function, see trans_formula_v.
trans_formula(data, var, formu)trans_formula(data, var, formu)
data |
An |
var |
Variable name to be converted. |
formu |
Formula parameters for data conversion. Such as |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_trans <- nem |> trans_formula(Mesorhabditis, ~log(x+1))
An easynem-class data that stores the result of formula
conversion.
Other functions in this package for filtering and transforming data sets:
filter_name, filter_num, trans_formula_v,
trans_name, trans_norm, trans_rare,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_formula(Mesorhabditis, ~log(x+1)) show(nem_trans)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_formula(Mesorhabditis, ~log(x+1)) show(nem_trans)
The trans_formula_v() is used to convert the formula of easynem meta.
Formula transformation is sometimes necessary in nematode community analysis.
For example, to ensure that the data is normally distributed, it is often
necessary to perform ln(x+1) transformation or other forms of formula
transformation on nematode abundance. This function can transfer vectors to
achieve multi-variable formula conversion. For a univariate simplified version
of this function, see trans_formula.
trans_formula_v(data, var, formu)trans_formula_v(data, var, formu)
data |
An |
var |
Vectorized variable names for formula conversion. |
formu |
Formula parameters for data conversion. Such as |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_trans <- nem |> trans_formula_v(colnames(resultmeta)[5:10], ~log(x+1))
An easynem-class data that stores the result of formula
conversion.
Other functions in this package for filtering and transforming data sets:
filter_name, filter_num, trans_formula,
trans_name, trans_norm, trans_rare,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_formula_v(nem@tab$OTUID, ~log(x+1)) show(nem_trans)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_formula_v(nem@tab$OTUID, ~log(x+1)) show(nem_trans)
The trans_name() is used to re-summarize the nematode abundance table
by nematode taxonomy table.
trans_name(data, taxonomy)trans_name(data, taxonomy)
data |
An |
taxonomy |
Nematode taxonomic name or other nematode attributes. |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_trans <- nem |> trans_name(Family)
A reclassified and aggregated easynem-class.
Since the nematode taxonomy table is automatically associated with the nematode
database (nem_database) including feeding and cp_value
when reading data through read_nem or read_nem2,
feeding can also be passed as a parameter to trans_name(). The
corresponding relationship between the feeding value and the actual nematode
feeding habits is as follows:
feeding = 1, plant feeding
feeding = 2, fungal hyphal feeding
feeding = 3, bacterial feeding
feeding = 4, substrate ingestion
feeding = 5, predation (including specialist predators of nematodes)
feeding = 6, eucaryote feeding
feeding = 7, dispersal stages or animal parasites
feeding = 8, omnivory (including general predators of nematodes)
Other functions in this package for filtering and transforming data sets:
filter_name, trans_formula, trans_formula_v,
filter_num, trans_norm, trans_rare,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_name(Family) show(nem_trans) nem_trans <- nem |> trans_name(feeding) show(nem_trans)nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_name(Family) show(nem_trans) nem_trans <- nem |> trans_name(feeding) show(nem_trans)
The trans_norm() is an extension of the decostand
function of the vegan package for easynem-class data, which is
used to standardize the nematode abundance table to reduce the order of magnitude
differences of nematodes in each treatment.
trans_norm(data, method, MARGIN = 2, ...)trans_norm(data, method, MARGIN = 2, ...)
data |
An |
method |
Standardization method. For details, refer to the
|
MARGIN |
Margin, |
... |
Other parameters of the |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_trans <- nem |> trans_norm(method = total)
A normalized easynem-class data.
Other functions in this package for filtering and transforming data sets:
filter_name, trans_formula, trans_formula_v,
trans_name, filter_num, trans_rare,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_norm(method = total) colSums(nem_trans@tab[,-1]) nem_trans <- nem |> trans_norm(method = percent) colSums(nem_trans@tab[,-1])nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_norm(method = total) colSums(nem_trans@tab[,-1]) nem_trans <- nem |> trans_norm(method = percent) colSums(nem_trans@tab[,-1])
The trans_rare() is an extension of the rrarefy
function of the vegan package for easynem-class data, which is
used to randomly rarefied OTU or ASV tables of nematodes for amplicon sequencing
data. The default is to rare according to the minimum abundance of nematode
in each treatment.
trans_rare(data, sample = 0, ...)trans_rare(data, sample = 0, ...)
data |
An |
sample |
Subsample size for rarefying community. The default |
... |
Other parameters of the |
To facilitate code interpretation, it is recommended to use the pipe symbol
|> to connect functions:
nem_trans <- nem |> trans_rare(1500)
A rarefied easynem-class data.
Other functions in this package for filtering and transforming data sets:
filter_name, trans_formula, trans_formula_v,
trans_name, filter_num, trans_norm,
trans_combine
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_rare() colSums(nem_trans@tab[,-1]) nem_trans <- nem |> trans_rare(1500) colSums(nem_trans@tab[,-1])nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_trans <- nem |> trans_rare() colSums(nem_trans@tab[,-1]) nem_trans <- nem |> trans_rare(1500) colSums(nem_trans@tab[,-1])
The TTest() is used to perform t-test for grouped data and create
compare-class. This function is only applicable to single factor
analysis, see TTest2 for a two factor version of the function.
TTest(data, .group, y, ...)TTest(data, .group, y, ...)
data |
An |
.group |
Grouping variables (supports only two groups). |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
Note: The t-test is only applicable to comparisons between two groups
of data. To facilitate code interpretation, It is recommended to use this
function in conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = TTest)
An compare-class object.
Other functions related to differential analysis methods: TTest2,
WilcoxTest, WilcoxTest2, KruskalTest,
KruskalTest2, LSD, LSD2, HSD,
HSD2.
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_ttestnem <- 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
The TTest2() is used to perform t-test for grouped data and create
compare2-class. This function is only applicable to two-factor
analysis, see TTest for a single factor version of the function.
TTest2(data, .group1, .group2, y, ...)TTest2(data, .group1, .group2, y, ...)
data |
An |
.group1 |
Grouping variables factor 1 (supports only two groups). |
.group2 |
Grouping variables factor 2 (supports only two groups). |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
Note: The t-test is only applicable to comparisons between two groups
of data. To facilitate code interpretation, It is recommended to use this
function in conjunction with the calc_compare2 function:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = TTest2)
An compare2-class object.
Other functions related to differential analysis methods: TTest,
WilcoxTest, WilcoxTest2, KruskalTest,
KruskalTest2, LSD, LSD2, HSD,
HSD2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_ttest <- nem |> filter_name(meta, con_crop %in% c("Y2", "Y11")) |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = TTest2) nem_ttestnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_ttest <- nem |> filter_name(meta, con_crop %in% c("Y2", "Y11")) |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = TTest2) nem_ttest
The WilcoxTest() is used to perform wilcoxon-test for grouped data and create
compare-class. This function is only applicable to single factor
analysis, see WilcoxTest2 for a two factor version of the function.
WilcoxTest(data, .group, y, ...)WilcoxTest(data, .group, y, ...)
data |
An |
.group |
Grouping variables (supports only two groups). |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
Note: The wilcoxon-test is only applicable to comparisons between two groups
of data. To facilitate code interpretation, It is recommended to use this
function in conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare(.group = con_crop, y = pH, method = WilcoxTest)
An compare-class object.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest2, KruskalTest,
KruskalTest2, LSD, LSD2, HSD,
HSD2.
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> filter_name(meta, Treatments %in% c("CK", "C8")) |> calc_compare(.group = Treatments, y = Mesorhabditis, method = WilcoxTest) nem_testnem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta) nem_test <- nem |> filter_name(meta, Treatments %in% c("CK", "C8")) |> calc_compare(.group = Treatments, y = Mesorhabditis, method = WilcoxTest) nem_test
The WilcoxTest2() is used to perform wilcoxon-test for grouped data and create
compare2-class. This function is only applicable to two-factor
analysis, see WilcoxTest for a single factor version of the function.
WilcoxTest2(data, .group1, .group2, y, ...)WilcoxTest2(data, .group1, .group2, y, ...)
data |
An |
.group1 |
Grouping variables factor 1 (supports only two groups). |
.group2 |
Grouping variables factor 2 (supports only two groups). |
y |
Dependent variable (numeric data). |
... |
Other parameters for |
Note: The wilcoxon-test is only applicable to comparisons between two groups
of data. To facilitate code interpretation, It is recommended to use this
function in conjunction with the calc_compare function:
nem_compare <- nem |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = WilcoxTest2)
An compare2-class object.
Other functions related to differential analysis methods: TTest2,
TTest, WilcoxTest, KruskalTest,
KruskalTest2, LSD, LSD2, HSD,
HSD2.
nem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> filter_name(meta, con_crop %in% c("Y2", "Y11")) |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = WilcoxTest2) nem_testnem <- read_nem(tab = easynem_example("nemtab1.csv"), tax = easynem_example("nemtax1.csv"), meta = easynem_example("nemmeta1.csv")) nem_test <- nem |> filter_name(meta, con_crop %in% c("Y2", "Y11")) |> calc_compare2(.group1 = con_crop, .group2 = season, y = pH, method = WilcoxTest2) nem_test