R 패키지 메타데이터와 수집 신호를 모아 봅니다.
첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.
DESCRIPTION에서 감지한 backend 관련 package입니다.
기본 메타데이터를 작은 카드와 토큰으로 압축합니다.
| Package | Type | Spec |
|---|---|---|
| ape CRAN · 1.6-16 · 2026-05-30 | Imports | ape |
| EntropyEstimation CRAN · 1.6-16 · 2026-05-30 | Imports | EntropyEstimation |
| ggplot2 CRAN · 1.6-16 · 2026-05-30 | Imports | ggplot2 |
| ggpubr CRAN · 1.6-16 · 2026-05-30 | Imports | ggpubr |
| graphics CRAN · 1.6-16 · 2026-05-30 | Imports | graphics |
| grDevices CRAN · 1.6-16 · 2026-05-30 | Imports | grDevices |
| parallel CRAN · 1.6-16 · 2026-05-30 | Imports | parallel |
| reshape2 CRAN · 1.6-16 · 2026-05-30 | Imports | reshape2 |
| rlang CRAN · 1.6-16 · 2026-05-30 | Imports | rlang |
| stats CRAN · 1.6-16 · 2026-05-30 | Imports | stats |
| tibble CRAN · 1.6-16 · 2026-05-30 | Imports | tibble |
| utils CRAN · 1.6-16 · 2026-05-30 | Imports | utils |
| vegan CRAN · 1.6-16 · 2026-05-30 | Imports | vegan |
| ade4 CRAN · 1.6-16 · 2026-05-30 | Suggests | ade4 |
| knitr CRAN · 1.6-16 · 2026-05-30 | Suggests | knitr |
| pkgdown CRAN · 1.6-16 · 2026-05-30 | Suggests | pkgdown |
| rmarkdown CRAN · 1.6-16 · 2026-05-30 | Suggests | rmarkdown |
| testthat CRAN · 1.6-16 · 2026-05-30 | Suggests | testthat |
| 검색 결과가 없습니다. | ||
| Type | Packages |
|---|---|
| Imports | 1 |
| Suggests | 1 |
CRAN: entropart citation info To cite entropart in publications use: Marcon E, Hérault B (2015). “entropart: An R Package to Measure and Partition Diversity.” Journal of Statistical Software , 67 (8), 1–26. doi:10.18637/jss.v067.i08 . Corresponding BibTeX entry: @Article{, title = {{entropart}: An {R} Package to Measure and Partition Diversity}, author = {Eric Marcon and Bruno H{\'e}rault}, journal = {Journal of Statistical Software}, year = {2015}, volume = {67}, number = {8}, pages = {1--26}, doi = {10.18637/jss.v067.i08}, }NEWS code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} entropart 1.6-16 External changes Replaced Geom*$default_aes by their values for compatibility with ggplot2 3.6.0 (PR #3 by @teunbrand ) entropart 1.6-15 Bug correction PhyloApply() sometimes raised an “Error in m[, 1] : incorrect number of dimensions” due to the automatic conversion of a single-row matrix to a vector by lapply() . This happened when the tree’s upper slice contained a single species. User-visible changes pkgdown site is now built with the bootstrap 5 template. entropart 1.6-12 Bug correction Corrected Coverage() documentation. “Marcon” correction of Shannon’s entropy never returned Grassberger’s estimate. This was very rarely an issue. Phylogenetic trees of class phylo with multichotomies raised an error when they were preprocessed by Preprocess.Tree() . entropart 1.6-11 Bug correction Corrected NEWS file structure. entropart 1.6-10 Improvements Deprecated aes_(x=~var) aesthetics in ggplots replaced by aes(x=.data$var) . entropart no longer suggests SPECIES. entropart 1.6-9 Bug correction Coverage2Size raised an error when the distribution had no singletons. Improvements entropart no longer depends on ggplot2. entropart 1.6-8 Bug correction An error occured when a function was called with entopart:: prefix and CheckArguments = TRUE and entropart was loaded. entropart 1.6-7 Bug correction argument main in autoplot() was ignored. Improvements Continuous integration by GitHub Actions. CommunityProfile() does not recenter simulated diversity values if simulated community size is not that of the actual community. $mid can store mean simulated values. CodeFactor recommendations applied. col , pch , cex and lty arguments in autoplot s. The first column of a dataframe passed to MetaCommunity() with species names may be characters instead of factors. tibbles are accepted by MetaCommunity() . Empty communities are detected by Metacommunity() and raise an error with an explicit message rather than returning obscure error messages when used by DivPart() and others. Suggests rmarkdown (https://github.com/yihui/knitr/issues/1864) entropart 1.6-6 Bug correction argument main in autoplot() was ignored. entropart 1.6-4 Improvements No longer imports geiger package (required by CRAN). entropart 1.6-3 New features Argument JackMax to limit the order of the jacknife estimator in Richness() , whatever the data. Bug correction plot.SpeciesDistribution did not fit the logseries and the broken stick distributions correctly. autoplot.DivProfile did not produce appropriate labels in the local communities profile. entropart 1.6-1 New features Estimation of diversity at a chosen level (sample size or coverage). DivAccum() function. Entropy accumulation functions. ggplot2 supported. autoplot() methods added for entropart objects. The “Best” estimator of diversity is now “UnveilJ” and the default estimator of richness is “Jackknife”. The “ChaoWangJost” estimator is renamed “ChaoJost”. Improvements Unit tests added. Vignette by pkgdown. Bug correction The jaccknife estimator of richness returned an error for communities where all species had the same abundance. Richness returned 0 instead of 1 for a community with a single species. entropart 1.5-3 Improvements On Travis now. Reduced package size. The rule to calculate the number of individuals of MetaCommunities has been changed to improve gamma diversity bias correction. See the user manual vignette. Generic function arguments cleaned up. Bug Correction Very large metacommunities returned an integer overflow error. entropart 1.4-8 Bug Correction HqzBeta() returned erroneous values if a species probability was equal to zero. Improvements On GitHub now. Documentation updated: phylogenetic dendrograms can be of class phylo , phylog , hclust or PPtree whatever the function. The introduction vignette is HTML now. A new vignette is dedicated to phylogenies. entropart 1.4-7 Bug Correction Argument checking ( CheckArguments = TRUE ) is not possible when the package is not loaded and a function is called by entropart::function() . An error was returned. It is replaced by a warning. Improvements Explicit export of all non-internal functions instead of exportPattern("^[[:alpha:]]+") Updated references to published articles. Updated help("entropart") . New introduction vignette. Vignettes compiled with knitr instead of Sweave . entropart 1.4-6 Improvements LazyData is used to save memory. Better reporting of the argument names in embedded calls of functions. Bug Correction The simulation of log-series communities was incorrect. entropart 1.4-5 User-visible changes Generalized Simpson’s entropy and diversity added ( GenSimpson and GenSimpsonD ). Originality.Species() is deprecated because it is pointless. ade4::originality() allows calculating it for q=2. Leinster (2009) and Leinster and Meckes (2015) showed that Originality.Species() does not depend on the order of diversity. Improvements ZhangGrabchak estimator of entropy is now calculated by the C code of EntropyEstimation::Tsallis.z / Entropy.z rather than the R code of bcTsallis() . This is much faster when the number of individual is high. Applies to ChaoWangJost (Best) estimator too. entropart 1.4-4 User-visible changes DivProfile() now allows computing bootstrap confidence intervals. Bug Correction The entropy estimation (of order different from 1) of a distribution with no singleton returned NA with ChaoWangJost correction. Reported by Zach Marion. Only partly corrected in Version 1.4-1. Corrected. DivEst returned incorrect beta diversity if q was not 1. Corrected. entropart 1.4-3 User-visible changes All scalar values of diversity or entropy are now named. Their name is the bias correction used to obtain them. The Unveiled estimator is more versatile. Correction = "Unveil" is deprecated and replaced by UnveilC , UnveiliC or UnveilJ in functions such as Tsallis() or Diversity() . Improvements Parallelization of DivProfile() , CommunityProfile() and PhyloApply() using the parallel package mclapply . No effect on Windows, pretty much faster on other systems. Extensive use of vapply() instead of sapply() makes some functions faster. AllenH() and ChaoPD() returned NA if the tree contained more species than the probability vector. Now, the tree may be pruned or kept unchanged and extra species considered to have probabilities 0. Bug Correction Using phylog trees in AllenH and ChaoPD() returned erroneous unnormalized diversity (divided by two) because of the conVersion of phylog to htree divides branch lengths by two. Corrected. The richness estimator iChao1 returned NA if the distibution contained singletons but no doubletons. Corrected. entropart 1.4.1 New Features phylog objects (deprecated in ade4 ) are replaced by phylo trees from package ape in the definition of the PPtree class. Issues caused by phylog such as replacing . and - by _ in species names do not occur any longer. phylog trees are still accepted for compatibility. ChaoPD() and AllenH() now accept phylo trees. Richness now returns a named value. The name contains the estimator used. Updated CITATION : the paper about this package has been published: Eric Marcon, Bruno Herault (2015). entropart: An R Package to Measure and Partition Diversity. Journal of Statistical Software , 67(8), 1-26. Bug Correction The entropy estimation of a distribution with no singleton returned NA with ChaoWangJost correction. Corrected. Entropy or diversity of a vector of zeros returned 0. It now returns NA . entropart 1.3.3 New Features Abundance and probability vector objects. See ?SpeciesDistribution . Hurlbert diversity. See ?Hurlbert . Optimal.Similarity . Miller-Madow estimator of entropy (Miller, 1955) added inREADME code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} Entropy Partitioning to Measure Diversity entropart is an R package that provides functions to calculate alpha, beta and gamma diversity of communities, including phylogenetic and functional diversity. Estimation-bias corrections are available. Details In the entropart package, individuals of different species are counted in several communities which may (or not) be agregated to define a metacommunity . In the metacommunity, the probability to find a species in the weighted average of probabilities in communities. This is a naming convention, which may correspond to plots in a forest inventory or any data organized the same way. Basic functions allow computing diversity of a community. Data is simply a vector of probabilities (summing up to 1) or of abundances (integer values that are numbers of individuals). Calculate entropy with functions such as Tsallis , Shannon , Simpson , Hurlbert or GenSimpson and explicit diversity (i.e. effective number of species) with Diversity and others. By default, the best available estimator of diversity will be used, according to the data. Communities can be simulated by rCommunity , explicitely declared as a species distribution ( as.AbdVector or as.ProbaVector ), and plotted. Phylogenetic entropy and diversity can be calculated if a phylogenetic (or functional), ultrametric tree is provided. See PhyloEntropy , Rao for examples of entropy and PhyloDiversity to calculate phylodiversity, with the state-of-the-art estimation-bias correction. Similarity-based diversity is calculated with Dqz , based on a similarity matrix. Vignettes A quick introduction is in vignette("entropart") . A full documentation is available online, in the “Articles” section of the web site of the vignette. It is a continuous update of the paper published in the Journal of Statistical Software ( Marcon & Hérault, 2015 ). The development version documentation is also available. Reference Marcon, E. and Herault, B. (2015). entropart: An R Package to Measure and Partition Diversity. Journal of Statistical Software . 67(8): 1-26.Help for package entropart const macros = { "\\R": "\\textsf{R}", "\\mbox": "\\text", "\\code": "\\texttt"}; function processMathHTML() { var l = document.getElementsByClassName('reqn'); for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); } return; } Package {entropart} Contents entropart-package AbdFreqCount Accumulation AllenH AlphaDiversity AlphaEntropy ArgumentOriginalName BetaDiversity BetaEntropy ChaoPD CheckentropartArguments CommunityProfile Coverage DivEst DivPart DivProfile Diversity Dqz EightSpAbundance EightSpTree Enq EntropyCI GammaDiversity GammaEntropy GenSimpson Hqz HqzBeta Hurlbert KLq MC Utilities MCdiversity MCentropy MetaCommunity Optimal.Similarity PDFD PPtree Paracou618.Functional Paracou618.MC Paracou618.Taxonomy Paracou618.dist PhyloApply PhyloBetaEntropy PhyloDiversity PhyloEntropy PhyloValue Preprocess.MC Preprocess.Tree RAC Rao Richness Shannon ShannonBeta SimTest Simpson SimpsonBeta SpeciesDistribution Tsallis TsallisBeta expq lnq mergeandlabel rCommunity reexports Type: Package Title: Entropy Partitioning to Measure Diversity Version: 1.6-16 Description: Measurement and partitioning of diversity, based on Tsallis entropy, following Marcon and Herault (2015) < doi:10.18637/jss.v067.i08 >. 'entropart' provides functions to calculate alpha, beta and gamma diversity of communities, including phylogenetic and functional diversity. Estimation-bias corrections are available. URL: https://ericmarcon.github.io/entropart/ , https://github.com/EricMarcon/entropart/ BugReports: https://github.com/EricMarcon/entropart/issues/ License: GPL-2 | GPL-3 [expanded from: GNU General Public License] Imports: ape, EntropyEstimation, ggplot2, ggpubr, graphics, grDevices, parallel, reshape2, rlang, stats, tibble, utils, vegan Suggests: ade4, knitr, pkgdown, rmarkdown, testthat LazyData: true VignetteBuilder: knitr SystemRequirements: pandoc Encoding: UTF-8 NeedsCompilation: no Packaged: 2025-02-07 11:53:59 UTC; emarc Author: Eric Marcon [aut, cre], Bruno Herault [aut] Maintainer: Eric Marcon <eric.marcon@agroparistech.fr> Repository: CRAN Date/Publication: 2025-02-07 12:40:02 UTC Entropy Partitioning to Measure Diversity Description Functions to calculate alpha, beta and gamma diversity of communities, including phylogenetic and functional diversity. Estimation-bias corrections are available. Details In the entropart package, individuals of different "species" are counted in several "communities" which may (or not) be agregated to define a "metacommunity". In the metacommunity, the probability to find a species in the weighted average of probabilities in communities. This is a naming convention, which may correspond to plots in a forest inventory or any data organized the same way. Basic functions allow computing diversity of a community. Data is simply a vector of probabilities (summing up to 1) or of abundances (integer values that are numbers of individuals). Calculate entropy with functions such as Tsallis , Shannon , Simpson , Hurlbert or GenSimpson and explicit diversity (i.e. effective number of species) with Diversity and others. By default, the best available estimator of diversity will be used, according to the data. Communities can be simulated by rCommunity , explicitely declared as a species distribution ( as.AbdVector or as.ProbaVector ), and plotted. Phylogenetic entropy and diversity can be calculated if a phylogenetic (or functional), ultrametric tree is provided. See PhyloEntropy , Rao for examples of entropy and PhyloDiversity to calculate phylodiversity, with the state-of-the-art estimation-bias correction. Similarity-based diversity is calculated with Dqz , based on a similarity matrix. The simplest way to import data is to organize it into two text files. The first file should contain abundance data: the first column named Species for species names, and a column for each community. The second file should contain the community weights in two columns. The first one, named Communities should contain their names and the second one, named Weights , their weights. Files can be read and data imported by code such as: Abundances <- read.csv(file="Abundances.csv", row.names = 1) Weights <- read.csv(file="Weights.csv") MC <- MetaCommunity(Abundances, Weights) The last line of the code calls the MetaCommunity function to create an object that will be used by all metacommunity functions, such as DivPart (to partition diversity), DivEst (to partition diversity and calculate confidence interval of its estimation) or DivProfile (to compute diversity profiles). A full documentation is available in the vignette. Type: vignette("entropart") . A quick introuction is in vignette("introduction", "entropart") . Author(s) Eric Marcon, Bruno Herault References Grabchak, M., Marcon, E., Lang, G., and Zhang, Z. (2017). The Generalized Simpson's Entropy is a Measure of Biodiversity. Plos One , 12(3): e0173305. Marcon, E. (2015) Practical Estimation of Diversity from Abundance Data. HAL 01212435: 1-27. Marcon, E. and Herault, B. (2015). entropart: An R Package to Measure and Partition Diversity. Journal of Statistical Software , 67(8): 1-26. Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Herault, B., Baraloto, C. and Lang, G. (2012). The Decomposition of Shannon's Entropy and a Confidence Interval for Beta Diversity. Oikos 121(4): 516-522. Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3). Abundance Frequency Count of a Community Description Counts the number of species observed the same number of times. Usage AbdFreqCount(Ns, Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", CheckArguments = TRUE) Arguments Ns A numeric vector containing species abundances. Level The level of interpolation or extrapolation. It may be an an arbitrary sample size (an integer) or a sample coverage (a number between 0 and 1). PCorrection A string containing one of the possible corrections to estimate a probability distribution in as.ProbaVector : "Chao2015" is the default value. Used only for extrapolation. Unveiling A string containing one of the possible unveiling methods to estimate the probabilities of the unobserved species in as.ProbaVector : "geom" (geometric: the unobserved species distribution is geometric) is the default value. Used only for extrapolation. RCorrection A string containing a correction recognized by Richness to evaluate the total number of species in as.ProbaVector . "Rarefy" is the default value to estimate the number of species such that the richness of the asymptotic distribution rarefied to the observed sample size equals the observed number of species in the data. Used only for extrapolation. CheckArguments Logical; if TRUE , the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere. Details The Abundance Frequency Count (Chao et al. , 2015) is the number of species observed each number of times. It is a way to summarize the species distribution. It can be estimated at a specified level of interpolation or extrapolation. Extrapolation relies on the estimation of the estimation of the asymptotic distribution of the community by as.ProbaVector and eq. (5) of Chao et al. (2014). Value A two-column matrix. The first column contains the number of observations, the second one the number of species observed this number of times. References Chao, A., Gotelli, N. J., Hsieh, T. C., Sander, E. L., Ma, K. H., Colwell, R. K., Ellison, A. M (2014). Rarefaction and extrapolation with Hill numbers: A framework for sampling and estimation in species diversity studies. Ecological Monographs , 84(1): 45-67. Chao, A., Hsieh, T.Counts the number of species observed the same number of times.
AbdFreqCount(Ns, Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ns is the vector of abundances of the first plot Ns <- Paracou618.MC$Nsi[, 1] # Return the abundance frequency count (AbdFreqCount(Ns) -> afc) plot(afc, xlab="Number of observations", ylab="Number of species") lines(afc)Diversity and Entropy Accumulation Curves represent the accumulation of entropy with respect to the sample size.
as.AccumCurve(x, y, low = NULL, high = NULL) is.AccumCurve(x) EntAC(Ns, q = 0, n.seq = seq_len(sum(Ns)), PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", NumberOfSimulations = 0, Alpha = 0.05, ShowProgressBar = TRUE, CheckArguments = TRUE) DivAC(Ns, q = 0, n.seq = seq_len(sum(Ns)), PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", NumberOfSimulations = 0, Alpha = 0.05, ShowProgressBar = TRUE, CheckArguments = TRUE) plotAccumCurve(x, ..., main = NULL, xlab = "Sample Size", ylab = NULL, ylim = NULL, LineWidth = 2, ShadeColor = "grey75", BorderColor = "red") autoplotAccumCurve(object, ..., main = NULL, xlab = "Sample Size", ylab = NULL, ShadeColor = "grey75", alpha = 0.3, BorderColor = "red", col = "black", lty = 1, lwd = 0.5)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Accumulation curve of Simpson's diversity autoplot(DivAC(Ns, q=2))Calculates the phylogenetic diversity of order q of a probability vector.
AllenH(Ps, q = 1, PhyloTree, Normalize = TRUE, Prune = FALSE, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Calculate the phylogenetic Shannon diversity of the plot AllenH(Ps, 1, Paracou618.Taxonomy, Normalize=TRUE) # Calculate it using PhyloEntropy: more powerful but much slower is the tree has many periods PhyloEntropy(Ps, 1, Paracou618.Taxonomy, Normalize=TRUE) -> phyE summary(phyE)Calculates the eeduced-bias total alpha diversity of order q of communities.
AlphaDiversity(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Calculate Simpson alpha diversity summary(AlphaDiversity(Paracou618.MC, 2)) # Compare without correction summary(AlphaDiversity(Paracou618.MC, 2, Correction = "None")) # Estimate phylogenetic Simpson alpha diversity summary(AlphaDiversity(Paracou618.MC, 2, Tree = Paracou618.Taxonomy) -> e) plot(e)Calculates the reduced-bias total alpha entropy of order q of communities.
AlphaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Calculate Simpson alpha entropy summary(AlphaEntropy(Paracou618.MC, 2)) # Compare without correction summary(AlphaEntropy(Paracou618.MC, 2, Correction = "None")) # Estimate phylogenetic Simpson alpha entropy summary(AlphaEntropy(Paracou618.MC, 2, Tree = Paracou618.Taxonomy) -> e) plot(e)This function is used internally to find the name of arguments passed to entropart functions such as PhyloDiversity that store them in their results.
ArgumentOriginalName(x)Calculates the reduced-bias beta diversity of order q between communities.
BetaDiversity(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Estimate Shannon beta diversity summary(BetaDiversity(Paracou618.MC, 1)) # Compare without correction summary(BetaDiversity(Paracou618.MC, 1, Correction = "None")) # Estimate phylogenetic Shannon beta diversity summary(BetaDiversity(Paracou618.MC, 1, Tree = Paracou618.Taxonomy) -> e)Calculates the reduced-bias beta entropy of order q between communities.
BetaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Estimate Shannon beta entropy summary(BetaEntropy(Paracou618.MC, 1)) # Compare without correction summary(BetaEntropy(Paracou618.MC, 1, Correction = "None")) # Estimate phylogenetic Shannon beta entropy summary(BetaEntropy(Paracou618.MC, 1, Tree = Paracou618.Taxonomy) -> e) plot(e)Calculates the phylogenetic diversity of order q of a probability vector.
ChaoPD(Ps, q = 1, PhyloTree, Normalize = TRUE, Prune = FALSE, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ps is the vector of probabilities Ps <- Paracou618.MC$Ps # Calculate the phylogenetic Simpson diversity of the plot (ChaoPD(Paracou618.MC$Ps, 2, Paracou618.Taxonomy, Normalize=TRUE)) # Calculate it using PhyloDiversity # (more powerful but much slower if the tree has many periods) PhyloDiversity(Paracou618.MC$Ps, 2, Paracou618.Taxonomy, Normalize=TRUE) -> phyD summary(phyD)This function is used internally to verify that arguments passed to entropart functions such as PhyloDiversity are correct.
CheckentropartArguments()Calculates the diversity or entropy profile of a community, applying a community function to a vector of orders.
CommunityProfile(FUN, NorP, q.seq = seq(0, 2, 0.1), NumberOfSimulations = 0, Alpha = 0.05, BootstrapMethod = "Chao2015", size = 1, , ShowProgressBar = TRUE, CheckArguments = TRUE) as.CommunityProfile(x, y, low = NULL, high = NULL, mid = NULL) is.CommunityProfile(x) plotCommunityProfile(x, , main = NULL, xlab = "Order of Diversity", ylab = "Diversity", ylim = NULL, LineWidth = 2, ShadeColor = "grey75", BorderColor = "red") autoplotCommunityProfile(object, , main = NULL, xlab = "Order of Diversity", ylab = "Diversity", ShadeColor = "grey75", alpha = 0.3, BorderColor = "red", col = "black", lty = 1, lwd = 0.5) CEnvelope(Profile, LineWidth = 2, ShadeColor = "grey75", BorderColor = "red", )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Plot diversity estimated without bias correction plot(CommunityProfile(Diversity, Paracou618.MC$Ps, seq(0, 2, 0.2)), lty=3, ylim=c(50, 350)) # Estimate diversity, with a condidence envelope # (only 10 simulations to save time, should be 1000) Profile <- CommunityProfile(Diversity, as.AbdVector(Paracou618.MC$Ns), seq(0, 2, 0.2), Correction="UnveilJ", NumberOfSimulations=10) # Complete the plot, and add the legend CEnvelope(Profile, main="Paracou Plots Diversity") legend("topright", c("Bias Corrected", "Biased"), lty=c(1,3), inset=0.01) # Advanced use with beta-diversity functions : # Profile of the beta entropy of the first community of Paracou618. # Observed and expected probabilities are bound into a 2-column matrix # An intermediate function is necessary to separate them before calling TsallisBeta # The CheckArguments is mandatory but does not need to be set: CommunityProfile() sets it to FALSE CommunityProfile(function(PandPexp, q, CheckArguments) TsallisBeta(PandPexp[, 1], PandPexp[, 2], q), NorP=cbind(Paracou618.MC$Psi[, 1], Paracou618.MC$Ps), q.seq=seq(0, 2, 0.2))"Coverage" calculates an estimator of the sample coverage of a community described by its abundance vector. "Coverage2Size" estimates the sample size corresponding to the chosen sample coverage.
Coverage(Ns, Estimator = "Best", Level = NULL, CheckArguments = TRUE) Coverage2Size(Ns, SampleCoverage, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the vector of abundances of the metacommunity Ns <- Paracou618.MC$Ns # Calculate the sample coverage of the metacommunity Coverage(Ns) # Stored in Paracou618.SampleCoverageEstimates diversity of a metacommunity.
DivEst(q = 0, MC, Biased = TRUE, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, Simulations = 100, ShowProgressBar = TRUE, CheckArguments = TRUE) is.DivEst(x) plotDivEst(x, , main = NULL, Which = "All", Quantiles = c(0.025, 0.975), colValue = "red", lwdValue = 2, ltyValue = 2, colQuantiles = "black", lwdQuantiles = 1, ltyQuantiles = 2) autoplotDivEst(object, , main = NULL, Which = "All", labels = NULL, font.label = list(size=11, face="plain"), Quantiles = c(0.025, 0.975), colValue = "red", colQuantiles = "black", ltyQuantiles = 2) summaryDivEst(object, )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Estimate Shannon diversity. Estimation <- DivEst(q = 1, Paracou618.MC, Biased = FALSE, Correction = "UnveilJ", Simulations = 20) plot(Estimation) summary(Estimation)Partitions the diversity of a metacommunity into alpha and beta components.
DivPart(q = 1, MC, Biased = TRUE, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE) is.DivPart(x) plotDivPart(x, ) autoplotDivPart(object, col = "grey35", border = NA, ) summaryDivPart(object, )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Estimate Shannon diversity. summary(DivPart(q = 1, Paracou618.MC, Biased = FALSE) -> dp) plot(dp)Calculate the diversity profiles (alpha, beta, gamma) of a metacommunity.
DivProfile(q.seq = seq(0, 2, 0.1), MC, Biased = TRUE, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, NumberOfSimulations = 0, Alpha = 0.05, ShowProgressBar = TRUE, CheckArguments = TRUE) is.DivProfile(x) plotDivProfile(x, , main = NULL, xlab = "Order of Diversity", ylab = NULL, Which = "All", LineWidth = 2, ShadeColor = "grey75", BorderColor = "red") autoplotDivProfile(object, , main = NULL, xlab = "Order of Diversity", ylab = NULL, Which = "All", ShadeColor = "grey75", alpha = 0.3, BorderColor = "red", labels = NULL, font.label = list(size=11, face="plain"), col = "black", lty = 1, lwd = 0.5) summaryDivProfile(object, )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Estimate diversity. Profile <- DivProfile(q.seq = seq(0, 2, 0.1), Paracou618.MC, Biased = FALSE) plot(Profile) autoplot(Profile) summary(Profile)Calculates the HCDT (generalized) diversity of order q of a probability vector.
Diversity(NorP, q = 1, ) bcDiversity(Ns, q = 1, Correction = "Best", CheckArguments = TRUE) DiversityProbaVector(NorP, q = 1, , CheckArguments = TRUE, Ps = NULL) DiversityAbdVector(NorP, q = 1, Correction = "Best", Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", , CheckArguments = TRUE, Ns = NULL) Diversityinteger(NorP, q = 1, Correction = "Best", Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", , CheckArguments = TRUE, Ns = NULL) Diversitynumeric(NorP, q = 1, Correction = "Best", Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Calculate diversity of order 1, i.e. Shannon's diversity Diversity(Ps, q=1) # Calculate it with estimation bias correction (asymptotic estimator) Diversity(Ns, q=1) # Extrapolate it up to 99.9% sample coverage (close to the asymptotic estimator) Diversity(Ns, q=1, Level=0.999) # Rarefy it to half the sample size Diversity(Ns, q=1, Level=sum(Ns)/2)Calculates the diversity of order q of a probability vector according to a similarity matrix.
Dqz(NorP, q = 1, Z = diag(length(NorP)), ) bcDqz(Ns, q = 1, Z = diag(length(Ns)), Correction = "Best", CheckArguments = TRUE) DqzProbaVector(NorP, q = 1, Z = diag(length(NorP)), , CheckArguments = TRUE, Ps = NULL) DqzAbdVector(NorP, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ns = NULL) Dqzinteger(NorP, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ns = NULL) Dqznumeric(NorP, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Prepare the similarity matrix DistanceMatrix <- as.matrix(Paracou618.dist) # Similarity can be 1 minus normalized distances between species Z <- 1 - DistanceMatrix/max(DistanceMatrix) # Calculate diversity of order 2 Dqz(Paracou618.MC$Ns, 2, Z)This dataset is a light-weight example.
data(Paracou618)data(Paracou618) EightSpAbundanceThis dataset is a leight-weight example.
data(Paracou618)data(Paracou618) # Preprocess the tree to be able to plot it # without loading ade4 package plot(Preprocess.Tree(EightSpTree), hang=-0.01)Expected value of n^q when n follows a Poisson law.
Enq(n, q)# Compare n <- c(2,3) Enq(n, q=2) # with n^2 # Result is 1 Enq(n, q=0) # Result is 0 Enq(n, q=5)Resamples a community by Monte-Carlo simulations of a multinomial distribution and returns a vector of entropy values to calculate confidence intervals.
EntropyCI(FUN, Simulations = 100, Ns, BootstrapMethod = "Chao2015", ShowProgressBar = TRUE, , CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Abundance (all estimators will include bias corrrection) Ns <- as.AbdVector(Paracou618.MC$Ns) q <- 1 # Estimate entropy and transform it into diversity RealEst <- expq(Tsallis(Ns, q), q) # Transform the distribution of Tsallis entropy into diversity SimulatedDiversity <- expq(EntropyCI(Tsallis, Simulations=50, Ns, q=q), q) # Figure plot(density(SimulatedDiversity), col="black", lwd=2, main="", xlab ="Diversity") abline(v=RealEst, col="red", lwd=2, lty=2) abline(v=quantile(SimulatedDiversity, probs = 0.025), col="black", lwd=1, lty=3) abline(v=quantile(SimulatedDiversity, probs = 0.975), col="black", lwd=1, lty=3) legend("topright", c("Real value", "Confidence interval"), lty=c(2,3), col=c("red", "black"), inset=0.01) # Print results cat("Estimated Diversity:", RealEst) quantile(SimulatedDiversity, probs = c(0.025, 0.975))Calculates the reduced-bias diversity of order q of a metacommunity.
GammaDiversity(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Calculate Simpson gamma diversity GammaDiversity(Paracou618.MC, 2) # Compare without correction GammaDiversity(Paracou618.MC, 2, Correction = "None") # Estimate phylogenetic Simpson gamma diversity GammaDiversity(Paracou618.MC, 2, Tree = Paracou618.Taxonomy)Calculates the reduced-bias Tsallis entropy of order q of a metacommunity.
GammaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, PhyloDetails = FALSE, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Calculate Simpson gamma entropy GammaEntropy(Paracou618.MC, 2) # Compare without correction GammaEntropy(Paracou618.MC, 2, Correction = "None") # Estimate phylogenetic Simpson gamma entropy GammaEntropy(Paracou618.MC, 2, Tree = Paracou618.Taxonomy)Calculates the Generalized Simpson's entropy of order r of a probability or abundance vector, and its effective number of species.
GenSimpson(NorP, r = 1, ) bcGenSimpson(Ns, r = 1, CheckArguments = TRUE) GenSimpsonProbaVector(NorP, r = 1, , CheckArguments = TRUE, Ps = NULL) GenSimpsonAbdVector(NorP, r = 1, , CheckArguments = TRUE, Ns = NULL) GenSimpsoninteger(NorP, r = 1, , CheckArguments = TRUE, Ns = NULL) GenSimpsonnumeric(NorP, r = 1, , CheckArguments = TRUE, Ps = NULL, Ns = NULL) GenSimpsonD(NorP, r = 1, ) bcGenSimpsonD(Ns, r = 1, CheckArguments = TRUE) GenSimpsonDProbaVector(NorP, r = 1, , CheckArguments = TRUE, Ps = NULL) GenSimpsonDAbdVector(NorP, r = 1, , CheckArguments = TRUE, Ns = NULL) GenSimpsonDinteger(NorP, r = 1, , CheckArguments = TRUE, Ns = NULL) GenSimpsonDnumeric(NorP, r = 1, , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Calculate GenSimpson entropy of order 1, equal to Simpson's index of diversity GenSimpson(Ps, 1) # Calculate an unbiased estimator of GenSimpson diversity of order 100 GenSimpsonD(Ns, 100)Calculates the entropy of order q of a probability vector according to a similarity matrix.
Hqz(NorP, q = 1, Z = diag(length(NorP)), ) bcHqz(Ns, q = 1, Z = diag(length(Ns)), Correction = "Best", SampleCoverage = NULL, CheckArguments = TRUE) HqzProbaVector(NorP, q = 1, Z = diag(length(NorP)), , CheckArguments = TRUE, Ps = NULL) HqzAbdVector(NorP, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ns = NULL) Hqzinteger(NorP, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ns = NULL) Hqznumeric(NorP, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Prepare the similarity matrix DistanceMatrix <- as.matrix(EightSpTree$Wdist^2/2) # Similarity can be 1 minus normalized distances between species Z <- 1 - DistanceMatrix/max(DistanceMatrix) # Calculate diversity of order 2 Ps <- EightSpAbundance/sum(EightSpAbundance) Hqz(Ps, 2, Z) # Equal to normalized Rao quadratic entropy when q=2 Rao(Ps, EightSpTree)/max(DistanceMatrix) # But different from PhyloEntropy for all other q, e.g. 1 Hqz(Ps, 1, Z) summary(PhyloEntropy(Ps, 1, EightSpTree))Calculates the similarity-based beta entropy of order q of a community belonging to a metacommunity.
HqzBeta(NorP, NorPexp = NULL, q = 1, Z = diag(length(NorP)), ) bcHqzBeta(Ns, Nexp = NULL, q = 1, Z = diag(length(Ns)), Correction = "Best", CheckArguments = TRUE) HqzBetaProbaVector(NorP, NorPexp = NULL, q = 1, Z = diag(length(NorP)), , CheckArguments = TRUE, Ps = NULL, Pexp = NULL) HqzBetaAbdVector(NorP, NorPexp = NULL, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) HqzBetainteger(NorP, NorPexp = NULL, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) HqzBetanumeric(NorP, NorPexp = NULL, q = 1, Z = diag(length(NorP)), Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL, Pexp = NULL, Nexp = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ps) # Probability distribution of the first plot Ps1 <- as.ProbaVector(Paracou618.MC$Psi[, 1]) # Prepare the similarity matrix DistanceMatrix <- as.matrix(Paracou618.dist) # Similarity can be 1 minus normalized distances between species Z <- 1 - DistanceMatrix/max(DistanceMatrix) # Divergence of order 2 between plot 1 and the whole forest HqzBeta(Ps1, Ps, q=2, Z)Calculates the Hurlbert entropy of order k of a probability or abundance vector, and its effective number of species.
Hurlbert(NorP, k = 2, ) bcHurlbert(Ns, k = 2, CheckArguments = TRUE) HurlbertProbaVector(NorP, k = 2, , CheckArguments = TRUE, Ps = NULL) HurlbertAbdVector(NorP, k = 2, , CheckArguments = TRUE, Ns = NULL) Hurlbertinteger(NorP, k = 2, , CheckArguments = TRUE, Ns = NULL) Hurlbertnumeric(NorP, k = 2, , CheckArguments = TRUE, Ps = NULL, Ns = NULL) HurlbertD(NorP, k = 2, ...) bcHurlbertD(Ns, k = 2, CheckArguments = TRUE) HurlbertDProbaVector(NorP, k = 2, , CheckArguments = TRUE, Ps = NULL) HurlbertDAbdVector(NorP, k = 2, , CheckArguments = TRUE, Ns = NULL) HurlbertDinteger(NorP, k = 2, , CheckArguments = TRUE, Ns = NULL) HurlbertDnumeric(NorP, k = 2, , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Calculate Hurlbert entropy of order 2, equal to Simpson's index of diversity Hurlbert(Ps, 2) # Calculate an unbiased estimator of Hurlbert entropy of order 2 Hurlbert(Ns, 2)Calculates the generalized Kullback-Leibler divergence between an observed and an expected probability distribution.
KLq(Ps, Pexp, q = 1, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ps is the vector of probabilities Ps <- Paracou618.MC$Ps # Probability distribution of the first plot Ps1 <- Paracou618.MC$Psi[, 1] # Divergence of order 2 between the first plot and the whole forest KLq(Ps1, Ps, 2)Tools to manipulate meta-communities. From a list of meta-communities, MergeMC creates a metacommunity whose communities are each original metacommunity. MergeC creates a metacommunity whose communities are each original community. ShuffleMC randomly assigns original communities to a metacommunity, keeping original weights, and returns a list of meta-communities.
MergeMC(MClist, Weights = rep(1, length(MClist)), CheckArguments = TRUE) MergeC(MClist, Weights = rep(1, length(MClist)), CheckArguments = TRUE) ShuffleMC(MClist, Weights = rep(1, length(MClist)), CheckArguments = TRUE)# First meta-community (df <- data.frame(C1 = c(10, 10, 10, 10), C2 = c(0, 20, 35, 5), C3 = c(25, 15, 0, 2), row.names = c("sp1", "sp2", "sp3", "sp4"))) w <- c(1, 2, 1) MC1 <- MetaCommunity(Abundances = df, Weights = w) # Second meta-community (df <- data.frame(C1 = c(10, 4), C2 = c(3, 4), row.names = c("sp1", "sp5"))) w <- c(3, 2) MC2 <- MetaCommunity(Abundances = df, Weights = w) # Merge communities plot(MergeC(list(MC1, MC2)), main="Merged communities") # Merge metacommunities plot(MergeMC(list(MC1, MC2)), main="Merged meta-communities") smc <- ShuffleMC(list(MC1, MC2)) plot(MergeMC(smc), main="Shuffled, then Merged meta-communities")Methods for objects of type "MCdiversity".
is.MCdiversity(x) plotMCdiversity(x, ) autoplotMCdiversity(object, col = "grey35", border = NA, ) summaryMCdiversity(object, )Methods for objects of type "MCentropy".
is.MCentropy(x) plotMCentropy(x, ) autoplotMCentropy(object, col = "grey35", border = NA, ) summaryMCentropy(object, )Methods for objects of type "MetaCommunity".
MetaCommunity(Abundances, Weights = rep(1, ncol(Abundances))) is.MetaCommunity(x) summaryMetaCommunity(object, ) plotMetaCommunity(x, )# Use BCI data from vegan package if (require(vegan, quietly = TRUE)) # Load BCI data (number of trees per species in each 1-ha plot of a tropical forest) data(BCI) # BCI dataframe must be transposed (its lines are plots, not species) BCI.df <- as.data.frame(t(BCI)) # Create a metacommunity object from a matrix of abundances and a vector of weights # (here, all plots have a weight equal to 1) MC <- MetaCommunity(BCI.df)Calculates the scale parameter u that maximizes the variance of the similarity matrix exp(-u*DistanceMatrix).
Optimal.Similarity(Distance, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Prepare the similarity matrix. The square root of Paracou618.dist is euclidean. optimal <- Optimal.Similarity(sqrt(Paracou618.dist)) # Optimal scale optimal$u # Calculate diversity of order 2 bcDqz(Paracou618.MC$Ns, 2, optimal$Matrix)Calculates Faith's PD / Petchey and Gaston' FD of a community described by a probability vector and a phylogenetic / functional tree.
PDFD(Ps, Tree, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ps is the vector of probabilities Ps <- Paracou618.MC$Ps # Calculate the phylogenetic Shannon diversity of the plot PDFD(Ps, Paracou618.Taxonomy)Methods for objects of type "PPtree".
is.PPtree(x) plotPPtree(x, )data(Paracou618) # Preprocess a phylog object ppt <- Preprocess.Tree(EightSpTree) # Is it a preprocessed tree? is.PPtree(ppt) # Plot it plot(ppt, hang=-1) # Alternative plot ade4::radial.phylog(EightSpTree)This dataset is from Paracou field station, French Guiana, managed by https://www.cirad.frCirad. Traits are detailed in Marcon and Herault (2014), the tree was built following Paine et al. (2011), based on Paracou618.dist.
data(Paracou618)Permanent data census of Paracou.data(Paracou618) plot(Paracou618.Functional)This dataset is from Paracou field station, French Guiana, managed by https://www.cirad.frCirad.
data(Paracou618)Permanent data census of Paracou and Marcon et al. (2012).data(Paracou618) summary(Paracou618.MC)This dataset is from Paracou field station, French Guiana, managed by https://www.cirad.frCirad.
data(Paracou618)Permanent data census of Paracou.data(Paracou618) plot(Paracou618.Taxonomy, type="fan", show.tip.label=FALSE)This dataset is from Paracou field station, French Guiana, managed by https://www.cirad.frCirad. Traits are detailed in Marcon and Herault (2014), the distance matrix was built following Paine et al. (2011).
data(Paracou618)Permanent data census of Paracou.data(Paracou618) plot(density(Paracou618.dist, from=0), main="Distances between species")Cuts the tree into slices separated by nodes, applies the function to each slice and returns the weighted (by slice lengths) sum of the results.
PhyloApply(Tree, FUN, NorP, Normalize = TRUE, dfArgs = NULL, , CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Plot the taxonomy plot(Paracou618.Taxonomy, type="fan", show.tip.label=FALSE) # Calculate the mean number of trees (individuals) per species # (Cuts are 1=species, 2=genus, 3=family) summary(PhyloApply(Paracou618.Taxonomy, mean, Paracou618.MC$Ns, TRUE))Calculates the phylogenetic beta entropy of order q of a a community belonging to a metacommunity.
PhyloBetaEntropy(NorP, NorPexp = NULL, q = 1, Tree, Normalize = TRUE, ) bcPhyloBetaEntropy(Ns, Nexp, q = 1, Tree, Normalize = TRUE, Correction = "Best", CheckArguments = TRUE) PhyloBetaEntropyProbaVector(NorP, NorPexp = NULL, q = 1, Tree, Normalize = TRUE, , CheckArguments = TRUE, Ps = NULL, Pexp = NULL) PhyloBetaEntropyAbdVector(NorP, NorPexp = NULL, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) PhyloBetaEntropyinteger(NorP, NorPexp = NULL, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) PhyloBetaEntropynumeric(NorP, NorPexp = NULL, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL, Pexp = NULL, Nexp = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ps) # Probability distribution of the first plot Ps1 <- as.ProbaVector(Paracou618.MC$Psi[, 1]) # Calculate the phylogenetic Shannon beta entropy of the plot summary(PhyloBetaEntropy(Ps1, Ps, 1, Paracou618.Taxonomy) -> e) plot(e) # Ns is the vector of abundances of the metacommunity Ns <- as.AbdVector(Paracou618.MC$Ns) # Abundances in the first plot Ns1 <- as.AbdVector(Paracou618.MC$Nsi[, 1]) # Calculate the phylogenetic Shannon beta entropy of the plot summary(bcPhyloBetaEntropy(Ns1, Ns, 1, Paracou618.Taxonomy, Correction = "Best") -> e) plot(e)Calculates the phylogenetic diversity of order q of a probability vector.
PhyloDiversity(NorP, q = 1, Tree, Normalize = TRUE, ) bcPhyloDiversity(Ns, q = 1, Tree, Normalize = TRUE, Correction = "Best", CheckArguments = TRUE) PhyloDiversityProbaVector(NorP, q = 1, Tree, Normalize = TRUE, , CheckArguments = TRUE, Ps = NULL) PhyloDiversityAbdVector(NorP, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ns = NULL) PhyloDiversityinteger(NorP, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ns = NULL) PhyloDiversitynumeric(NorP, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL) is.PhyloDiversity(x) summaryPhyloDiversity(object, )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ps) # Calculate the phylogenetic Shannon diversity of the plot summary(PhyloDiversity(Ps, 1, Paracou618.Taxonomy) -> d) plot(d) # Ns is the vector of abundances of the metacommunity Ns <- as.AbdVector(Paracou618.MC$Ns) # Calculate the phylogenetic Shannon diversity of the plot summary(bcPhyloDiversity(Ns, 1, Paracou618.Taxonomy, Correction = "Best") -> d) plot(d)Calculates the phylogenetic entropy of order q of a probability vector.
PhyloEntropy(NorP, q = 1, Tree, Normalize = TRUE, ) bcPhyloEntropy(Ns, q = 1, Tree, Normalize = TRUE, Correction = "Best", SampleCoverage = NULL, CheckArguments = TRUE) PhyloEntropyProbaVector(NorP, q = 1, Tree, Normalize = TRUE, , CheckArguments = TRUE, Ps = NULL) PhyloEntropyAbdVector(NorP, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ns = NULL) PhyloEntropyinteger(NorP, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ns = NULL) PhyloEntropynumeric(NorP, q = 1, Tree, Normalize = TRUE, Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL) is.PhyloEntropy(x) summaryPhyloEntropy(object, )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ps) # Calculate the phylogenetic Shannon entropy of the plot summary(PhyloEntropy(Ps, 1, Paracou618.Taxonomy) -> e) plot(e) # Ns is the vector of abundances of the metacommunity Ns <- as.AbdVector(Paracou618.MC$Ns) # Calculate the phylogenetic Shannon entropy of the plot summary(bcPhyloEntropy(Ns, 1, Paracou618.Taxonomy, Correction = "Best") -> e) plot(e)Entropy or diversity against the height of the phylogenetic or functional tree.
is.PhyloValue(x) autoplotPhyloValue(object, xlab = expression(italic("T")), ylab = NULL, main = NULL, col = "black", lty = 1, lwd = 0.5, ) plotPhyloValue(x, xlab = expression(italic("T")), ylab = NULL, main = NULL, ) summaryPhyloValue(object, )# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest # and their taxonomy) data(Paracou618) # Calculate richness along the tree # (Cuts are 1=species, 2=genus, 3=family) summary(r <- PhyloApply(Paracou618.Taxonomy, FUN=Richness, NorP=Paracou618.MC$Ns, Normalize=TRUE)) autoplot(r)Calculates summary statistics of a metacommunity
Preprocess.MC(Nsi, Wi)Calculates cuts and intervals of a phylogenetic tree and make it available both in hclust and "phylo" (see [ape]read.tree) formats.
Preprocess.Tree(Tree)Observed distributions are fitted to classical RAC's.
RAClnorm(Ns, CheckArguments = TRUE) RACgeom(Ns, CheckArguments = TRUE) RAClseries(Ns, CheckArguments = TRUE) RACbstick(Ns, CheckArguments = TRUE)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Fitted parameters RACln <- RAClnorm(Ns) RACln$mu RACln$sigma RACgeom(Ns)$prob RAClseries(Ns)$alpha RACbstick(Ns)$maxCalculates Rao's quadratic entropy of a community described by a probability vector and a phylogenetic / functional tree.
Rao(NorP, Tree, ) bcRao(Ns, Tree, Correction="Lande", CheckArguments = TRUE) RaoProbaVector(NorP, Tree, , CheckArguments = TRUE, Ps = NULL) RaoAbdVector(NorP, Tree, Correction = "Lande", , CheckArguments = TRUE, Ns = NULL) Raointeger(NorP, Tree, Correction = "Lande", , CheckArguments = TRUE, Ns = NULL) Raonumeric(NorP, Tree, Correction = "Lande", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Calculate Rao's quadratic entropy of the plot Rao(Ps, Paracou618.Taxonomy)Calculates the number of species from probability vector. The name is that of the estimator (the bias correction) used.
Richness(NorP, ) bcRichness(Ns, Correction = "Best", Alpha = 0.05, JackOver = FALSE, JackMax = 10, CheckArguments = TRUE) RichnessProbaVector(NorP, , CheckArguments = TRUE, Ps = NULL) RichnessAbdVector(NorP, Correction = "Best", Alpha = 0.05, JackOver = FALSE, JackMax = 10, Level = NULL, PCorrection = "Chao2015", Unveiling = "geom", RCorrection = "Rarefy", , CheckArguments = TRUE, Ns = NULL) Richnessinteger(NorP, Correction = "Best", Alpha = 0.05, JackOver = FALSE, JackMax = 10, Level = NULL, PCorrection = "Chao2015", Unveiling = "geom", RCorrection = "Rarefy", , CheckArguments = TRUE, Ns = NULL) Richnessnumeric(NorP, Correction = "Best", Alpha = 0.05, JackOver = FALSE, JackMax = 10, Level = NULL, PCorrection = "Chao2015", Unveiling = "geom", RCorrection = "Rarefy", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Number of observed species Richness(Ps) # Estimate the actual number of species bcRichness(Ns, Correction = "Chao1") bcRichness(Ns, Correction = "iChao1") bcRichness(Ns, Correction = "Jackknife") bcRichness(Ns, Correction = "Jackknife", JackOver=TRUE)Calculates the Shannon entropy of a probability vector.
Shannon(NorP, ...) bcShannon(Ns, Correction = "Best", CheckArguments = TRUE) ShannonProbaVector(NorP, , CheckArguments = TRUE, Ps = NULL) ShannonAbdVector(NorP, Correction = "Best", Level = NULL, PCorrection = "Chao2015", Unveiling = "geom", RCorrection = "Rarefy", , CheckArguments = TRUE, Ns = NULL) Shannoninteger(NorP, Correction = "Best", Level = NULL, PCorrection = "Chao2015", Unveiling = "geom", RCorrection = "Rarefy", , CheckArguments = TRUE, Ns = NULL) Shannonnumeric(NorP, Correction = "Best", Level = NULL, PCorrection = "Chao2015", Unveiling = "geom", RCorrection = "Rarefy", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Calculate Shannon entropy Shannon(Ps) # Calculate the best estimator of Shannon entropy Shannon(Ns) # Use metacommunity data to calculate reduced-bias Shannon beta as mutual information (bcShannon(Paracou618.MC$Ns) + bcShannon(colSums(Paracou618.MC$Nsi)) - bcShannon(Paracou618.MC$Nsi))Calculates the Shannon beta entropy of a community belonging to a metacommunity.
ShannonBeta(NorP, NorPexp = NULL, ) bcShannonBeta(Ns, Nexp, Correction = "Best", CheckArguments = TRUE) ShannonBetaProbaVector(NorP, NorPexp = NULL, , CheckArguments = TRUE, Ps = NULL, Pexp = NULL) ShannonBetaAbdVector(NorP, NorPexp = NULL, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) ShannonBetainteger(NorP, NorPexp = NULL, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) ShannonBetanumeric(NorP, NorPexp = NULL, Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL, Pexp = NULL, Nexp = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ps) # Probability distribution of the first plot Ps1 <- as.ProbaVector(Paracou618.MC$Psi[, 1]) # Shannon beta entropy of the plot ShannonBeta(Ps1, Ps) # Ns is the vector of abundances of the metacommunity Ns <- as.AbdVector(Paracou618.MC$Ns) # Abundances in the first plot Ns1 <- as.AbdVector(Paracou618.MC$Nsi[, 1]) # Reduced-bias estimator of Shannon beta entropy of the plot bcShannonBeta(Ns1, Ns)Methods for objects of type "SimTest", used to test a value against its distribution under a simulated null hypothesis.
as.SimTest(RealValue, SimulatedValues) is.SimTest(x) autoplotSimTest(object, Quantiles = c(0.025, 0.975), , colValue = "red", colQuantiles = "black", ltyQuantiles = 2, main = NULL, xlab = "Simulated Values", ylab = "Density") plotSimTest(x, Quantiles = c(0.025, 0.975), , colValue = "red", lwdValue = 2, ltyValue = 2, colQuantiles = "black", lwdQuantiles = 1, ltyQuantiles = 2, main = NULL, xlab = "Simulated Values", ylab = "Density") summarySimTest(object, Quantiles = c(0.025, 0.975), )# Set the value to test Real <- 0.8 # Is it a realization of a Gaussian distribution? Sims <- rnorm(1000) # Make a Simtest object st <- as.SimTest(Real, Sims) summary(st) # Plot plot(st) # ggplot autoplot(st)Calculates the Simpson entropy of a probability vector.
Simpson(NorP, ) bcSimpson(Ns, Correction = "Best", CheckArguments = TRUE) SimpsonProbaVector(NorP, , CheckArguments = TRUE, Ps = NULL) SimpsonAbdVector(NorP, Correction="Best", Level = NULL, , CheckArguments = TRUE, Ns = NULL) Simpsoninteger(NorP, Correction="Best", Level = NULL, , CheckArguments = TRUE, Ns = NULL) Simpsonnumeric(NorP, Correction="Best", Level = NULL, , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Calculate an unbiased estimator of Simpson's index of diversity Simpson(Ns)Calculates the Simpson beta entropy of a community belonging to a metacommunity.
SimpsonBeta(NorP, NorPexp = NULL, ) bcSimpsonBeta(Ns, Nexp, Correction = "Best", CheckArguments = TRUE) SimpsonBetaProbaVector(NorP, NorPexp = NULL, , CheckArguments = TRUE, Ps = NULL, Pexp = NULL) SimpsonBetaAbdVector(NorP, NorPexp = NULL, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) SimpsonBetainteger(NorP, NorPexp = NULL, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) SimpsonBetanumeric(NorP, NorPexp = NULL, Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL, Pexp = NULL, Nexp = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ps is the vector of probabilities Ps <- as.ProbaVector(Paracou618.MC$Ps) # Probability distribution of the first plot Ps1 <- as.ProbaVector(Paracou618.MC$Psi[, 1]) # Simpson beta entropy of the plot SimpsonBeta(Ps1, Ps) # Transform into diversity expq(SimpsonBeta(Ps1, Ps)/(1-Simpson(Ps1)), 2) # Ns is the vector of abundances of the metacommunity Ns <- as.AbdVector(Paracou618.MC$Ns) # Abundances in the first plot Ns1 <- as.AbdVector(Paracou618.MC$Nsi[, 1]) # Reduced-bias Shannon beta entropy of the plot bcSimpsonBeta(Ns1, Ns)A Species Distribution is a (preferably named) vector containing species abundances or probabilities.
as.SpeciesDistribution(x, ) as.SpeciesDistributiondata.frame(x, ) as.SpeciesDistributioninteger(x, ) as.SpeciesDistributionnumeric(x, ) autoplotSpeciesDistribution(object, , Distribution = NULL, ylog = TRUE, main = NULL, xlab = "Rank", ylab = NULL, pch = 19, col = "black", cex = 1.5) plotSpeciesDistribution(x, , Distribution = NULL, type = "b", log = "y", main = NULL, xlab = "Rank", ylab = NULL) is.SpeciesDistribution(x) as.ProbaVector(x, ) as.ProbaVectordata.frame(x, ) as.ProbaVectorinteger(x, Correction = "None", Unveiling = "None", RCorrection = "Jackknife", JackOver = FALSE, JackMax = 10, CEstimator = "ZhangHuang", q = 0, , CheckArguments = TRUE) as.ProbaVectornumeric(x, Correction = "None", Unveiling = "None", RCorrection = "Jackknife", JackOver = FALSE, JackMax = 10, CEstimator = "ZhangHuang", q = 0, , CheckArguments = TRUE) is.ProbaVector(x) as.AbdVector(x, ) as.AbdVectordata.frame(x, Round = TRUE, ) as.AbdVectorinteger(x, ) as.AbdVectornumeric(x, Round = TRUE, ) is.AbdVector(x)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Whittaker plot, poorly fitted by a log-normal distribution plot(Ns, Distribution = "lnorm") # ggplot version autoplot(Ns, Distribution = "lnorm")Calculates the HCDT, also known as Tsallis entropy of order q of a probability vector.
Tsallis(NorP, q = 1, ) bcTsallis(Ns, q = 1, Correction = "Best", SampleCoverage = NULL, CheckArguments = TRUE) TsallisProbaVector(NorP, q = 1, , CheckArguments = TRUE, Ps = NULL) TsallisAbdVector(NorP, q = 1, Correction = "Best", Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", , CheckArguments = TRUE, Ns = NULL) Tsallisinteger(NorP, q = 1, Correction = "Best", Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", , CheckArguments = TRUE, Ns = NULL) Tsallisnumeric(NorP, q = 1, Correction = "Best", Level = NULL, PCorrection="Chao2015", Unveiling="geom", RCorrection="Rarefy", , CheckArguments = TRUE, Ps = NULL, Ns = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ns is the total number of trees per species Ns <- as.AbdVector(Paracou618.MC$Ns) # Species probabilities Ps <- as.ProbaVector(Paracou618.MC$Ns) # Whittaker plot plot(Ns) # Calculate entropy of order 1, i.e. Shannon's entropy Tsallis(Ps, 1) # Calculate it with estimation bias correction Tsallis(Ns, 1)Calculates the Tsallis beta entropy of order q of a community belonging to a metacommunity.
TsallisBeta(NorP, NorPexp = NULL, q = 1, ) bcTsallisBeta(Ns, Nexp = NULL, q, Correction = "Best", CheckArguments = TRUE) TsallisBetaProbaVector(NorP, NorPexp = NULL, q = 1, , CheckArguments = TRUE, Ps = NULL, Pexp = NULL) TsallisBetaAbdVector(NorP, NorPexp = NULL, q = 1, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) TsallisBetainteger(NorP, NorPexp = NULL, q = 1, Correction = "Best", , CheckArguments = TRUE, Ns = NULL, Nexp = NULL) TsallisBetanumeric(NorP, NorPexp = NULL, q = 1, Correction = "Best", , CheckArguments = TRUE, Ps = NULL, Ns = NULL, Pexp = NULL, Nexp = NULL)# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest) data(Paracou618) # Ps is the vector of probabilities Ps <- Paracou618.MC$Ps # Probability distribution of the first plot Ps1 <- Paracou618.MC$Psi[, 1] # Divergence of order 2 between plot 1 and the whole forest TsallisBeta(Ps1, Ps, 2) # Ns is the vector of abundances of the metacommunity Ns <- Paracou618.MC$Ns # Abundances in the first plot Ns1 <- Paracou618.MC$Nsi[, 1] # Divergence of order 2 between plot 1 and the whole forest, with bias correction bcTsallisBeta(Ns1, Ns, 2)Functions to calculate alpha, beta and gamma diversity of communities, including phylogenetic and functional diversity. Estimation-bias corrections are available.
Calculates the deformed exponential of order q.
expq(x, q) expq.CommunityProfile(Profile)curve(exp(x), -5, 0, lty=3) curve(expq(x, 2), -5, 0, lty=2, add=TRUE) curve(expq(x, 3), -5, 0, lty=1, add=TRUE) legend("topleft", legend = c("exp(x)", "exp2(x)", "exp3(x)"), lty = c(1, 2, 3), inset=0.02)Calculates the deformed logarithm of order q.
lnq(x, q) lnq.CommunityProfile(Profile)curve(log(x), 0, 1, lty=1) curve(lnq(x, 2), 0, 1, lty=2, add=TRUE) curve(lnq(x, 3), 0, 1, lty=3, add=TRUE) legend("topleft", legend = c("log(x)", "ln2(x)", "ln3(x)"), lty = c(1, 2, 3), inset=0.02)Merge two dataframes containing species abundances.
mergeandlabel(x, y)Draws random communities according to a probability distribution.
rCommunity(n, size = sum(NorP), NorP = 1, BootstrapMethod = "Chao2015", S = 300, Distribution = "lnorm", sd = 1, prob = 0.1, alpha = 40, CheckArguments = TRUE)# Generate communities made of 100000 individuals among 300 species and fit them par(mfrow = c(2,2)) for (d in c("lnorm", "lseries", "geom", "bstick")) rCommunity(n = 1, size = 1E5, S = 300, Distribution = d) -> AbdVec plot(AbdVec, Distribution = d, main = d)These objects are imported from other packages. Follow the links below to see their documentation. ggplot2[ggplot2]autoplot graphics[graphics:plot.default]plot
| Repository | Version | Published | First seen | Last seen | Docs |
|---|---|---|---|---|---|
| CRAN | 1.6-16 | 2026-05-29 | 2026-05-30 |
표시할 OSV 데이터가 없습니다.
표시할 OpenAlex 데이터가 없습니다.