entropart

R 패키지 메타데이터와 수집 신호를 모아 봅니다.

Packages / CRAN / entropart

entropart

v1.6-16
Repository CRANLicense GNU General Public LicenseLifecycle activeNeeds compilation no
DOI
10.32614/CRAN.package.entropart
Task views
Phylogenetics
Reverse imports
38

Core Signals

첫 화면에서 판단해야 할 수집 신호를 먼저 배치합니다.

2
Task views
Phylogenetics
Reverse imports
38

Supported Backends

DESCRIPTION에서 감지한 backend 관련 package입니다.

0
backend package 신호가 없습니다.

Quick Facts

기본 메타데이터를 작은 카드와 토큰으로 압축합니다.

profile
Repository
CRAN
Version
1.6-16
License
GNU General Public License
Lifecycle
active
Needs compilation
no
Reverse imports
38
Last observed
2026-05-30
CRAN
cran.r-project.org/package=entropart

수집 소스별 패키지 정보

1개 소스
CRAN
1.6-16
2026-05-30
License
GNU General Public License
Imports
ape, EntropyEstimation, ggplot2, ggpubr, graphics, grDevices, parallel, reshape2, rlang, stats, tibble, utils, vegan
Suggests
ade4, knitr, pkgdown, rmarkdown, testthat
Needs compilation
no
Reverse imports
38
Lifecycle
active
Last observed
2026-05-30 10:45:11

이 패키지가 의존하는 패키지

5개 표시전체 18개
PackageTypeSpec
ape
CRAN · 1.6-16 · 2026-05-30
Importsape
EntropyEstimation
CRAN · 1.6-16 · 2026-05-30
ImportsEntropyEstimation
ggplot2
CRAN · 1.6-16 · 2026-05-30
Importsggplot2
ggpubr
CRAN · 1.6-16 · 2026-05-30
Importsggpubr
graphics
CRAN · 1.6-16 · 2026-05-30
Importsgraphics
1 / 4

이 패키지를 쓰는 패키지

2개 표시전체 2개
PackageTypeSpec
inpdfr
0.1.12
CRAN · 2026-05-30
Importsentropart (>= 1.4.1)
cati
0.99.6
CRAN · 2026-05-30
Suggestsentropart
1 / 1

Reverse dependency summary

2 types
TypePackages
Imports1
Suggests1

패키지 페이지

Reverse imports
2
Reverse suggests
2
All links
48
Repository
CRAN
Version
1.6-16
Collected
2026-05-23 22:30:54
Package page
https://cran.r-project.org/web/packages/entropart/index.html
DOI
10.32614/CRAN.package.entropart
Citation
https://cran.r-project.org/web/packages/entropart/citation.html
CRAN checks
https://cran.r-project.org/web/checks/check_results_entropart.html
README
https://cran.r-project.org/web/packages/entropart/readme/README.html
NEWS
https://cran.r-project.org/web/packages/entropart/news/news.html
Reference HTML
https://cran.r-project.org/web/packages/entropart/refman/entropart.html
Reference PDF
https://cran.r-project.org/web/packages/entropart/entropart.pdf
Source package
https://cran.r-project.org/src/contrib/entropart_1.6-16.tar.gz
Archive
https://CRAN.R-project.org/src/contrib/Archive/entropart
In views
Phylogenetics
Page fields
Author
Eric Marcon [aut, cre], Bruno Herault [aut]
BugReports
https://github.com/EricMarcon/entropart/issues/
CRAN Checks
entropart results
Citation
entropart citation info
DOI
10.32614/CRAN.package.entropart
In Views
Phylogenetics
License
GPL-2 | GPL-3 [expanded from: GNU General Public License]
Maintainer
Eric Marcon <eric.marcon at agroparistech.fr>
Materials
README , NEWS
NeedsCompilation
no
Old Sources
entropart archive
Package Source
entropart_1.6-16.tar.gz
Published
2025-02-07
Reference Manual
entropart.html , entropart.pdf
Reverse Imports
inpdfr
Reverse Suggests
cati
SystemRequirements
pandoc
URL
https://ericmarcon.github.io/entropart/ , https://github.com/EricMarcon/entropart/
Version
1.6-16
Vignettes
Introduction to entropart ( source , R code )
Windows Binaries
r-devel: entropart_1.6-16.zip , r-release: entropart_1.6-16.zip , r-oldrel: entropart_1.6-16.zip
MacOS Binaries
r-release (arm64): entropart_1.6-16.tgz , r-oldrel (arm64): entropart_1.6-16.tgz , r-release (x86_64): entropart_1.6-16.tgz , r-oldrel (x86_64): entropart_1.6-16.tgz
Version
1.6-16
Published
2025-02-07
DOI
10.32614/CRAN.package.entropart
Maintainer
Eric Marcon <eric.marcon at agroparistech.fr>
BugReports
https://github.com/EricMarcon/entropart/issues/
License
GPL-2 | GPL-3 [expanded from: GNU General Public License]
URL
https://ericmarcon.github.io/entropart/ , https://github.com/EricMarcon/entropart/
NeedsCompilation
no
SystemRequirements
pandoc
Citation
entropart citation info
Materials
README , NEWS
In Views
Phylogenetics
CRAN Checks
entropart results
Reference Manual
entropart.html , entropart.pdf
Vignettes
Introduction to entropart ( source , R code )
Package Source
entropart_1.6-16.tar.gz
Windows Binaries
r-devel: entropart_1.6-16.zip , r-release: entropart_1.6-16.zip , r-oldrel: entropart_1.6-16.zip
MacOS Binaries
r-release (arm64): entropart_1.6-16.tgz , r-oldrel (arm64): entropart_1.6-16.tgz , r-release (x86_64): entropart_1.6-16.tgz , r-oldrel (x86_64): entropart_1.6-16.tgz
Old Sources
entropart archive
Reverse Imports
inpdfr
Reverse Suggests
cati
Page sections 4
Documentation
Heading
Documentation
Links
[{"label":"entropart.html","section":"","type":"","url":"https://cran.r-project.org/web/packages/entropart/refman/entropart.html"},{"label":"entropart.pdf","section":"","type":"","url":"https://cran.r-project.org/web/packages/entropart/entropart.pdf"},{"label":"Introduction to entropart","section":"","type":"","url":"https://cran.r-project.org/web/packages/entropart/vignettes/entropart.html"},{"label":"source","section":"","type":"","url":"https://cran.r-project.org/web/packages/entropart/vignettes/entropart.Rmd"},{"label":"R code","section":"","type":"","url":"https://cran.r-project.org/web/packages/entropart/vignettes/entropart.R"}]
Text
Reference manual: entropart.html , entropart.pdf Vignettes: Introduction to entropart ( source , R code )
Downloads
Heading
Downloads
Links
[{"label":"entropart_1.6-16.tar.gz","section":"","type":"","url":"https://cran.r-project.org/src/contrib/entropart_1.6-16.tar.gz"},{"label":"entropart_1.6-16.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.7/entropart_1.6-16.zip"},{"label":"entropart_1.6-16.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.6/entropart_1.6-16.zip"},{"label":"entropart_1.6-16.zip","section":"","type":"","url":"https://cran.r-project.org/bin/windows/contrib/4.5/entropart_1.6-16.zip"},{"label":"entropart_1.6-16.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/sonoma-arm64/contrib/4.6/entropart_1.6-16.tgz"},{"label":"entropart_1.6-16.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-arm64/contrib/4.5/entropart_1.6-16.tgz"},{"label":"entropart_1.6-16.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.6/entropart_1.6-16.tgz"},{"label":"entropart_1.6-16.tgz","section":"","type":"","url":"https://cran.r-project.org/bin/macosx/big-sur-x86_64/contrib/4.5/entropart_1.6-16.tgz"},{"label":"entropart archive","section":"","type":"","url":"https://CRAN.R-project.org/src/contrib/Archive/entropart"}]
Text
Package source: entropart_1.6-16.tar.gz Windows binaries: r-devel: entropart_1.6-16.zip , r-release: entropart_1.6-16.zip , r-oldrel: entropart_1.6-16.zip macOS binaries: r-release (arm64): entropart_1.6-16.tgz , r-oldrel (arm64): entropart_1.6-16.tgz , r-release (x86_64): entropart_1.6-16.tgz , r-oldrel (x86_64): entropart_1.6-16.tgz Old sources: entropart archive
Reverse dependencies
Heading
Reverse dependencies
Links
[{"label":"inpdfr","section":"","type":"","url":"https://cran.r-project.org/web/packages/inpdfr/index.html"},{"label":"cati","section":"","type":"","url":"https://cran.r-project.org/web/packages/cati/index.html"}]
Text
Reverse imports: inpdfr Reverse suggests: cati
Linking
Heading
Linking
Links
[{"label":"https://CRAN.R-project.org/package=entropart","section":"","type":"","url":"https://CRAN.R-project.org/package=entropart"}]
Text
Please use the canonical form https://CRAN.R-project.org/package=entropart to link to this page.
Materials 2
Documentation 5
Vignettes 3
Downloads 9
All page links 48

패키지 문서 원문

5 artifacts
citation
Citation
CRAN · 1.6-16 · Citation · text/html · 1,062 · 2026-05-07
Title
CRAN: entropart citation info
Label
Citation
Text content
Text content
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}, }
field
NEWS
CRAN · 1.6-16 · Materials · text/html · 16,964 · 2026-05-07
Title
NEWS
Label
NEWS
Text content
Text content
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 in
field
README
CRAN · 1.6-16 · Materials · text/html · 4,239 · 2026-05-07
Title
README
Label
README
Text content
Text content
README 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.
reference_manual_html
Reference manual HTML
CRAN · 1.6-16 · Documentation · text/html · 298,279 · 2026-05-07
Title
Help for package entropart
Label
Reference manual HTML
Text content
Text content
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.
section
entropart.pdf
CRAN · 1.6-16 · Documentation · application/pdf · 429,493 · 2026-05-07
Title
entropart.pdf
Label
entropart.pdf

Reference for entropart (1.6-16)

63개 topic
AbdFreqCount
Abundance Frequency Count of a Community
CRAN · 1.6-16 · entropart/man/AbdFreqCount.Rd · 2026-05-07

Counts the number of species observed the same number of times.

Aliases
AbdFreqCount
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.
Examples
# 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)
See also
PhyloEntropy, ChaoPD
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. C., Chazdon, R. L., Colwell, R. K., Gotelli, N. J. (2015) Unveiling the Species-Rank Abundance Distribution by Generalizing Good-Turing Sample Coverage Theory. Ecology 96(5): 1189-1201.
Accumulation
Diversity accumulation.
CRAN · 1.6-16 · entropart/man/Accumulation.Rd · 2026-05-07

Diversity and Entropy Accumulation Curves represent the accumulation of entropy with respect to the sample size.

Aliases
DivACEntACas.AccumCurveis.AccumCurveautoplot.AccumCurveplot.AccumCurve
Usage
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)
Arguments
x
An object. A numeric vector in as.AccumCurve.
object
An object.
y
A numeric vector.
low
A numeric vector.
high
A numeric vector.
Ns
A numeric vector containing species abundances.
q
A number: the order of diversity. Default is 1.
n.seq
A sequence of numbers. Accumulation will be calculated at each value.
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 and q different from 0, 1, 2.
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 and q different from 0, 1, 2.
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 entropy of the asymptotic distribution rarefied to the observed sample size equals the observed entropy of the data. Used only for extrapolation and q different from 0, 1, 2. If q is 0 (extrapolation of richness), "Rarefy" is taken for "Jackknife".
NumberOfSimulations
The number of Simulations to build confidence intervals.
Alpha
The risk level, 5% by default.
Additional arguments to be passed to plot. Unused elsewhere.
main
The main title of the plot. if NULL (by default), there is no title.
xlab
The X axis label, "Rank" by default.
ylab
The Y axis label. if NULL (by default), "Probability" or "Abundance" is chosen according to the object class.
ylim
The interval of y values plotted.
LineWidth
The width of the line that represents the actual profile.
ShadeColor
The color of the shaded confidence envelope.
BorderColor
The color of the bounds of the confidence envelope.
alpha
Opacity of the confidence enveloppe, between 0 and 1.
col
The color of the geom objects. See "Color Specification" in par.
lty
The type of the lines. See lines.
lwd
The width of the lines. See lines.
ShowProgressBar
If TRUE (default), a progress bar is shown.
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
DivAC or EntAC estimate the diversity or entropy accumulation curve of a distribution. See Tsallis for details about the computation of entropy at each level of interpolation and extrapolation. In accumulation curves, extrapolation if done by estimating the asymptotic distribution of the community and estimating entropy at different levels by interpolation. The asymptotic richess is adjusted so that the extrapolated part of the accumulation joins the observed value at the sample size. AccumCurve objects include EntAC and DivAC objects for entropy and diversity accumulation. They generalize the classical Species Accumulation Curves (SAC) which are diversity accumulation of order $q=0$. as.AccumCurve transforms two vectors (where x is the sammple size and y the accumulation) into an object of class AccumCurve. AccumCurve objects can be plotted with either plot or autoplot methods.
Value
A DivAC or an EntAC object. Both are AccumCurve objects, which are a list: xThe sample size. yThe value of entropy or diversity. lowThe lower bound of the confidence envelope of the estimation. highThe upper bound of the confidence envelope of the estimation. Attibutes "Size" and "Value" contain the actual sample size and the corresponding diversity or entropy. AccumCurve objects can be summarized and plotted.
Examples
# 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))
See also
Tsallis, Diversity
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.
AllenH
Phylogenetic Entropy of a Community
CRAN · 1.6-16 · entropart/man/AllenH.Rd · 2026-05-07

Calculates the phylogenetic diversity of order q of a probability vector.

Aliases
AllenH
Usage
AllenH(Ps, q = 1, PhyloTree, Normalize = TRUE, Prune = FALSE, CheckArguments = TRUE)
Arguments
Ps
A probability vector, summing to 1.
q
A number: the order of entropy. Default is 1.
PhyloTree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree is not necessarily ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, it is proportional to the height of the tree.
Prune
What to do when somes species are in the tree but not in Ps? If TRUE, the tree is pruned to keep species of Ps only. The height of the tree may be changed if a pruned branch is related to the root. If FALSE (default), species with probability 0 are added in Ps.
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 phylogenetic entropy is calculated following Allen et al. (2009) for order q=1 and Leinster and Cobold (2011) for other orders.The result is identical to the total entropy calculated by PhyloEntropy but it is much faster. A single value is returned instead of a PhyloEntropy object, and no bias correction is available. The Normalize argument allows normalizing entropy by the height of the tree, similarly to ChaoPD. Diversity can be calculated for non ultrametric trees following Leinster and Cobold (2011) even though the meaning of the result is not so clear.
Value
A named number equal the entropy of the community. The name is "None" to recall that no bias correction is available.
Examples
# 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)
See also
PhyloEntropy, ChaoPD
References
Allen, B., Kon, M. and Bar-Yam, Y. (2009). A New Phylogenetic Diversity Measure Generalizing the Shannon Index and Its Application to Phyllostomid Bats. American Naturalist 174(2): 236-243. Leinster, T. and Cobbold, C. (2011). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489.
AlphaDiversity
Reduced-bias alpha diversity of a metacommunity
CRAN · 1.6-16 · entropart/man/AlphaDiversity.Rd · 2026-05-07

Calculates the eeduced-bias total alpha diversity of order q of communities.

Aliases
AlphaDiversity
Usage
AlphaDiversity(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)
Arguments
MC
A MetaCommunity object.
q
A number: the order of diversity. Default is 1 for Shannon diversity.
Correction
A string containing one of the possible corrections accepted by AlphaEntropy or "None" or "Best", the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, diversity is proportional to the height of the tree.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
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
Entropy is calculated by AlphaEntropy and transformed into diversity.
Value
An MCdiversity object containing diversity values of each community and of the metacommunity.
Examples
# 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)
See also
AlphaEntropy
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
AlphaEntropy
Reduced-bias alpha entropy of a metacommunity
CRAN · 1.6-16 · entropart/man/AlphaEntropy.Rd · 2026-05-07

Calculates the reduced-bias total alpha entropy of order q of communities.

Aliases
AlphaEntropy
Usage
AlphaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)
Arguments
MC
A MetaCommunity object.
q
A number: the order of diversity. Default is 1 for Shannon entropy.
Correction
A string containing one of the possible corrections accepted by the bias-corrected entropy function (see details) or "None" or "Best", the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), the entropy returned by the function is normalized by the height of the tree (it is the weighted average value of the entropy in each slice). If FALSE, it is the unnormalized weighted sum of the results.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
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
If Tree is not NULL, then phylogenetic entropy is calculated by bcPhyloEntropy; else, if Z is not NULL, then similarity-based entropy is calculated by bcHqz; else, neutral entropy is calculated by bcTsallis. The alpha entropy of each community is calculated and summed according to community weights. The possible corrections are detailed in Tsallis.
Value
An MCentropy object containing entropy values of each community and of the metacommunity.
Examples
# 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)
See also
bcTsallis
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
ArgumentOriginalName
Finds the original value (name of expression) of the argument of a function even in the case of embedded calls.
CRAN · 1.6-16 · entropart/man/ArgumentOriginalName.Rd · 2026-05-07

This function is used internally to find the name of arguments passed to entropart functions such as PhyloDiversity that store them in their results.

Aliases
ArgumentOriginalName
Keywords
internal
Usage
ArgumentOriginalName(x)
Arguments
x
Any argument.
Details
The function searches the name of the argument in the parent frame of the function and stops at the top.
Value
The name of the argument.
Author
BrodieG, <https://stackoverflow.com/users/2725969/brodieg> Eric Marcon <Eric.Marcon@agroparistech.fr>
BetaDiversity
Reduced-bias beta diversity of a metacommunity
CRAN · 1.6-16 · entropart/man/BetaDiversity.Rd · 2026-05-07

Calculates the reduced-bias beta diversity of order q between communities.

Aliases
BetaDiversity
Usage
BetaDiversity(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)
Arguments
MC
A MetaCommunity object.
q
A number: the order of diversity. Default is 1 for Shannon diversity.
Correction
A string containing one of the possible corrections accepted by bcTsallisBeta or "None" or "Best", the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, diversity is proportional to the height of the tree.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
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
Entropy is calculated by BetaEntropy and transformed into diversity. Diversity values of communities are not defined: community entropies are averaged to obtain the metacommunity entropy wich is transformed into diversity (Marcon et al., 2014).
Value
An MCdiversity object containing diversity value of the metacommunity.
Examples
# 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)
See also
BetaEntropy
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
BetaEntropy
Reduced-bias beta entropy of a metacommunity
CRAN · 1.6-16 · entropart/man/BetaEntropy.Rd · 2026-05-07

Calculates the reduced-bias beta entropy of order q between communities.

Aliases
BetaEntropy
Usage
BetaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)
Arguments
MC
A MetaCommunity object.
q
A number: the order of diversity. Default is 1 for Shannon entropy.
Correction
A string containing one of the possible corrections accepted by the bias-corrected entropy function (see details) or "None" or "Best", the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), the entropy returned by the function is normalized by the height of the tree (it is the weighted average value of the entropy in each slice). If FALSE, it is the unnormalized weighted sum of the results.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
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
If Tree is not NULL, then phylogenetic entropy is calculated by bcPhyloBetaEntropy; else, if Z is not NULL, then similarity-based entropy is calculated by bcHqzBeta; else, neutral entropy is calculated by bcTsallisBeta. The reduced-bias beta entropy of each community is calculated and summed according to community weights. Note that beta entropy is related to alpha entropy (if q is not 1) and cannot be compared accross communities (Jost, 2007). Do rather calculate the BetaDiversity of the metacommunity.
Value
An MCentropy object containing entropy values of each community and of the metacommunity.
Examples
# 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)
See also
bcTsallisBeta, BetaDiversity
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
ChaoPD
Phylogenetic Diversity of a Community
CRAN · 1.6-16 · entropart/man/ChaoPD.Rd · 2026-05-07

Calculates the phylogenetic diversity of order q of a probability vector.

Aliases
ChaoPD
Usage
ChaoPD(Ps, q = 1, PhyloTree, Normalize = TRUE, Prune = FALSE, CheckArguments = TRUE)
Arguments
Ps
A probability vector, summing to 1.
q
A number: the order of diversity. Default is 1.
PhyloTree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree is not necessarily ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, it is proportional to the height of the tree.
Prune
What to do when somes species are in the tree but not in Ps? If TRUE, the tree is pruned to keep species of Ps only. The height of the tree may be changed if a pruned branch is related to the root. If FALSE (default), species with probability 0 are added in Ps.
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 phylogenetic diversity is calculated following Chao et al. (2010). The result is identical to the total diversity calculated by PhyloDiversity but it is much faster. A single value is returned instead of a PhyloDiversity object, and no bias correction is available. The Normalize arguments allows calculating either ^qD(T) (if TRUE) or ^qPD(T) if FALSE. Diversity can be calculated for non ultrametric trees following Chao et al. (2010) even though the meaning of the result is not so clear (Leinster and Cobold, 2011).
Value
A named number equal the diversity of the community. The name is "None" to recall that no bias correction is available.
Examples
# 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)
See also
PhyloDiversity, AllenH
References
Chao, A., Chiu, C.-H. and Jost, L. (2010). Phylogenetic diversity measures based on Hill numbers. Philosophical Transactions of the Royal Society B 365(1558): 3599-609. Leinster, T. and Cobbold, C. (2011). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489.
CheckentropartArguments
Checks the arguments of a function of the package entropart
CRAN · 1.6-16 · entropart/man/CheckentropartArguments.Rd · 2026-05-07

This function is used internally to verify that arguments passed to entropart functions such as PhyloDiversity are correct.

Aliases
CheckentropartArguments
Keywords
internal
Usage
CheckentropartArguments()
Details
The function compares the arguments passed to its parent function to the type they should be and performs some extra tests (e.g. probabilities must be positive and sum to 1). It stops if an argument is not correct.
Value
Returns TRUE or stops if a problem is detected.
CommunityProfile
Diversity or Entropy Profile of a community
CRAN · 1.6-16 · entropart/man/CommunityProfile.Rd · 2026-05-07

Calculates the diversity or entropy profile of a community, applying a community function to a vector of orders.

Aliases
CommunityProfileas.CommunityProfileis.CommunityProfileplot.CommunityProfileautoplot.CommunityProfileCEnvelope
Usage
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", )
Arguments
FUN
The function to be applied to each value of q.seq. Any function accepting a numeric vector (or a two-column matrix) and a number as first two arguments and an argument named CheckArguments is acceptable (other arguments of the functions are passed by ). See *Details* for useful entropy and diversity functions and *Examples* for an ad-hoc one.
NorP
A numeric vector. Contains either abundances or probabilities.
q.seq
A numeric vector: the sequence of diversity orders to address. Default is from 0 to 2.
NumberOfSimulations
The number of simulations to run, 0 by default.
Alpha
The risk level, 5% by default.
BootstrapMethod
The method used to obtain the probabilities to generate bootstrapped communities from observed abundances. See rCommunity.
size
The size of simulated communities used to compute the bootstrap confidence envelope. 1 (default) means that the actual size must be used.
object
An object.
x
An object to be tested or plotted or the vector of orders of community profiles in as.CommunityProfile.
y
Entropy or diversity values of each order, corresponding to x values.
low
Entropy or diversity lower bound of the confidence envelope, corresponding to x values.
high
Entropy or diversity higher bound of the confidence envelope, corresponding to x values.
mid
Entropy or diversity center value (usually the mean) of the confidence envelope, corresponding to x values.
Profile
An CommunityProfile to be plotted.
Additional arguments to be passed to FUN in CommunityProfile, to plot in plot.CommunityProfile or to lines in CEnvelope.
main
The main title of the plot.
xlab
The x axis label of the plots.
ylab
The y axis label of the plot.
ylim
The interval of y values plotted.
LineWidth
The width of the line that represents the actual profile.
ShadeColor
The color of the shaded confidence envelope.
BorderColor
The color of the bounds of the confidence envelope.
alpha
Opacity of the confidence enveloppe, between 0 and 1.
col
The color of the geom objects. See "Color Specification" in par.
lty
The type of the lines. See lines.
lwd
The width of the lines. See lines.
ShowProgressBar
If TRUE (default), a progress bar is shown.
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 function CommunityProfile is used to calculate diversity or entropy profiles based on community functions such as Tsallis or ChaoPD. The first two arguments of the function must be a probability or abundance vector and a number (q). Additional arguments cannot be checked. Unexpected results may be returned if FUN is not used properly. If NumberOfSimulations is greater than 0, a bootstrap confidence interval is produced by simulating communities with rCommunity and calculating their profiles. The size of those communities may be that of the actual community or specified by size. Simulating communities implies a downward bias in the estimation: rare species of the actual community may have abundance zero in simulated communities. Simulated diversity values are recentered if `size = 1` so that their mean is that of the actual community. Else, it is assumed that the bias is of interest and must not be corrected. CommunityProfile objects can be plotted. They can also be added to the current plot by CEnvelope.
Value
A CommunityProfile, which is a list: xThe order q values yThe entropy or diversity values returned by FUN lowThe lower bound of the confidence interval highThe upper bound of the confidence interval
Examples
# 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))
Author
Eric Marcon <Eric.Marcon@agroparistech.fr>, Bruno Herault <Bruno.Herault@cirad.fr>
Coverage
Sample coverage of a community
CRAN · 1.6-16 · entropart/man/Coverage.Rd · 2026-05-07

"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.

Aliases
CoverageCoverage2Size
Usage
Coverage(Ns, Estimator = "Best", Level = NULL, CheckArguments = TRUE) Coverage2Size(Ns, SampleCoverage, CheckArguments = TRUE)
Arguments
Ns
A numeric vector containing species abundances.
Estimator
A string containing one of the possible estimators: "ZhangHuang", "Chao", "Turing", "Good". "Best" is for "ZhangHuang".
Level
The level of interpolation or extrapolation, i.e. an abundance.
SampleCoverage
The target sample coverage.
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 sample coverage C of a community is the total probability of occurence of the species observed in the sample. 1-C is the probability for an individual of the whole community to belong to a species that has not been sampled. The historical estimator is due to Turing (Good, 1953). It only relies on singletons (species observed only once). Chao's (Chao and Shen, 2010) estimator uses doubletons too and Zhang-Huang's (Chao et al., 1988; Zhang and Huang, 2007) uses the whole distribution. If Level is not null, the sample coverage is interpolated or extrapolated. Interpolation by the Good estimator relies on the equality between sampling deficit and the generalized Simpson entropy (Good, 1953). The Chao (2014) estimator allows extrapolation, reliable up a level equal to the double size of the sample.
Value
"Coverage" returns a named number equal to the calculated sample coverage. The name is that of the estimator used. "Coverage2Size" returns a number equal to the sample size corresponding to the chosen sample coverage.
Examples
# 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.SampleCoverage
References
Chao, A., Lee, S.-M. and Chen, T.-C. (1988). A generalized Good's nonparametric coverage estimator. Chinese Journal of Mathematics 16: 189-199. Chao, A. and Shen, T.-J. (2010). Program SPADE: Species Prediction And Diversity Estimation. Program and user's guide. CARE, Hsin-Chu, Taiwan. 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. Good, I. J. (1953). On the Population Frequency of Species and the Estimation of Population Parameters. Biometrika 40(3/4): 237-264. Zhang, Z. and Huang, H. (2007). Turing's formula revisited. Journal of Quantitative Linguistics 14(2-3): 222-241.
DivEst
Diversity Estimation of a metacommunity
CRAN · 1.6-16 · entropart/man/DivEst.Rd · 2026-05-07

Estimates diversity of a metacommunity.

Aliases
DivEstis.DivEstplot.DivEstautoplot.DivEstsummary.DivEst
Usage
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, )
Arguments
q
A number: the order of diversity.
MC
A MetaCommunity object.
Biased
Logical; if FALSE, a bias correction is appplied.
Correction
A string containing one of the possible corrections. The correction must be accepted by DivPart. "Best" is the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree.. If FALSE, diversity is proportional to the height of the tree.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
Simulations
The number of simulations to build confidence intervals.
ShowProgressBar
If TRUE (default), a progress bar is shown.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.
x
An object to be tested or plotted.
main
The title of the plot.
Which
May be "Alpha", "Beta" or "Gamma" to respectively plot the metacommunity's alpha, beta or gamma diversity. If "All" (default), all three plots are shown.
labels
Vector of labels to be added to multiple plots. "auto" is the same as c("a", "b", "c", "d)".
font.label
A list of arguments to customize labels. See [ggpubr]ggarrange.
object
A MCdiversity object to be summarized or plotted.
Quantiles
A vector containing the quantiles of interest.
colValue
The color of the line representing the real value on the plot.
lwdValue
The width of the line representing the real value on the plot.
ltyValue
The line type of the line representing the real value on the plot.
colQuantiles
The color of the lines representing the quantiles on the plot.
lwdQuantiles
The width of the lines representing the quantiles on the plot.
ltyQuantiles
The line type of the lines representing the quantiles on the plot.
Additional arguments to be passed to the generic methods.
Details
Divest estimates the diversity of the metacommunity and partitions it into alpha and beta components. If Tree is provided, the phylogenetic diversity is calculated else if Z is not NULL, then similarity-based entropy is calculated. Bootstrap confidence intervals are calculated by drawing simulated communities from a multinomial distribution following the observed frequencies (Marcon et al, 2012; 2014).
Value
A Divest object which is a DivPart object with an additional item in its list: SimulatedDiversityA matrix containing the simulated values of alpha, beta and gamma diversity. Divest objects can be summarized and plotted.
Examples
# 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)
See also
DivPart
Author
Eric Marcon <Eric.Marcon@agroparistech.fr>, Bruno Herault <Bruno.Herault@cirad.fr>
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339.
DivPart
Diversity Partition of a metacommunity
CRAN · 1.6-16 · entropart/man/DivPart.Rd · 2026-05-07

Partitions the diversity of a metacommunity into alpha and beta components.

Aliases
DivPartis.DivPartplot.DivPartautoplot.DivPartsummary.DivPart
Usage
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, )
Arguments
q
A number: the order of diversity. Default is 1.
MC
A MetaCommunity object.
Biased
Logical; if FALSE, a bias correction is appplied.
Correction
A string containing one of the possible corrections. The correction must be accepted by AlphaEntropy, BetaEntropy and GammaEntropy. "Best" is the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, diversity is proportional to the height of the tree.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.
x
An object to be tested or plotted.
object
A MCdiversity object to be summarized or plotted.
col
The color used to fill the bars. See "Color Specification" in par.
border
The color of the borders around the bars. See rect.
Additional arguments to be passed to the generic methods.
Details
DivPart partitions the diversity of the metacommunity into alpha and beta components. It supports estimation-bias correction. If Tree is provided, the phylogenetic diversity is calculated else if Z is not NULL, then similarity-based entropy is calculated. Beta diversity/entropy is calculated from Gamma and Alpha when bias correction is required, so community values are not available.
Value
A DivPart object. It is a list: MetaCommunityThe name of the MetaCommunity object containing inventory data. OrderThe value of q. BiasedLogical. If FALSE, bias corrected values of diversity have been computed. CorrectionThe estimation bias correction used to calculate diversity. MethodThe method used to calculate entropy ("HCDT", "Similarity-based"). TreeThe phylogenetic or functional tree used to calculate phylodiversity. NormalizedLogical. Indicates whether phylodiversity is normalized or proportional to the height of the tree. ZThe matrix used to calculate similarity-based entropy. TotalAlphaDiversityThe alpha diversity of communities. TotalBetaDiversityThe beta diversity of communities. GammaDiversityThe gamma diversity of the metacommunity. CommunityAlphaDiversitiesA vector containing the alpha diversity of each community. TotalAlphaEntropyThe alpha entropy of communities. TotalBetaEntropyThe beta entropy of communities. GammaEntropyThe gamma entropy of the metacommunity. CommunityAlphaEntropiesA vector containing the alpha entropy of each community. DivPart objects can be summarized and plotted.
Examples
# 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)
See also
DivProfile
Author
Eric Marcon <Eric.Marcon@agroparistech.fr>, Bruno Herault <Bruno.Herault@cirad.fr>
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
DivProfile
Diversity Profile of a metacommunity
CRAN · 1.6-16 · entropart/man/DivProfile.Rd · 2026-05-07

Calculate the diversity profiles (alpha, beta, gamma) of a metacommunity.

Aliases
DivProfileis.DivProfileplot.DivProfileautoplot.DivProfilesummary.DivProfile
Usage
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, )
Arguments
q.seq
A numeric vector.
MC
A MetaCommunity object.
Biased
Logical; if FALSE, a bias correction is appplied.
Correction
A string containing one of the possible corrections. The correction must be accepted by AlphaEntropy, BetaEntropy and GammaEntropy. "Best" is the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, diversity is proportional to the height of the tree.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
NumberOfSimulations
The number of simulations to run, 0 by default.
Alpha
The risk level, 5% by default.
ShowProgressBar
If TRUE (default), a progress bar is shown.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.
x
An object to be tested or plotted.
main
The main title of the plot. Ignored if Which = "All".
xlab
The x axis label of the plots.
ylab
The y axis label of the plot. Ignored if Which = "All".
Which
May be "Communities", "Alpha", "Beta" or "Gamma" to respectively plot the alpha diversity of communities or the metacommunity's alpha, beta or gamma diversity. If "All" (default), all four plots are shown.
LineWidth
The width of the line that represents the actual profile.
ShadeColor
The color of the shaded confidence envelope.
BorderColor
The color of the bounds of the confidence envelope.
alpha
Opacity of the confidence enveloppe, between 0 and 1.
labels
Vector of labels to be added to multiple plots. "auto" is the same as c("a", "b", "c", "d)".
font.label
A list of arguments to customize labels. See [ggpubr]ggarrange.
col
The color of the geom objects. See "Color Specification" in par.
lty
The type of the lines. See lines.
lwd
The width of the lines. See lines.
object
A MCdiversity object to be summarized or plotted.
Additional arguments to be passed to the generic methods.
Details
If Tree is provided, the phylogenetic diversity is calculated. DivPart partitions the diversity of the metacommunity into alpha and beta components. It supports estimation-bias correction. If Tree is provided, the phylogenetic diversity is calculated else if Z is not NULL, then similarity-based entropy is calculated. Beta diversity/entropy is calculated from Gamma and Alpha when bias correction is required, so community values are not available. If NumberOfSimulations is greater than 0, a bootstrap confidence interval is produced by simulating communities from a multinomial distribution following the observed frequencies (Marcon et al, 2012; 2014) and calculating their profiles.
Value
A DivProfile object. It is a list: MetaCommunityThe name of the MetaCommunity object containing inventory data. OrderA vector containing the values of q. BiasedLogical. If FALSE, bias corrected values of diversity have been computed. CorrectionThe estimation bias correction used to calculate diversity. Usually a string, but it may be a list if different corrections have been used in the estimation of phylodiversity. MethodThe method used to calculate entropy ("HCDT", "Similarity-based"). TreeThe phylogenetic or functional tree used to calculate phylodiversity. NormalizedLogical. Indicates whether phylodiversity is normalized or proportional to the height of the tree. ZThe matrix used to calculate similarity-based entropy. CommunityAlphaDiversitiesA matrix containing the alpha diversity of each community. TotalAlphaDiversityA vector containing the alpha diversity of communities for each order. BetaDiversityA vector containing the beta diversity of communities for each order. GammaDiversityA vector containing the gamma diversity of the metacommunity for each order. CommunityAlphaEntropiesA matrix containing the alpha entropy of each community. TotalAlphaEntropyA vector containing the alpha entropy of communities for each order. BetaEntropyA vector containing the beta entropy of communities for each order. GammaEntropyA vector containing the gamma entropy of the metacommunity for each order. Confidence envelopesTotal Alpha, Beta and Gamma Entropy and Diversity may come with a confidence envelope whose value is stored in twelve more vectors named suffixed Low or High, such as GammaEntropyLow DivProfile objects can be summarized and plotted.
Examples
# 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)
See also
DivPart
Author
Eric Marcon <Eric.Marcon@agroparistech.fr>, Bruno Herault <Bruno.Herault@cirad.fr>
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339.
Diversity
Hill number of a community
CRAN · 1.6-16 · entropart/man/Diversity.Rd · 2026-05-07

Calculates the HCDT (generalized) diversity of order q of a probability vector.

Aliases
DiversitybcDiversityDiversity.ProbaVectorDiversity.AbdVectorDiversity.integerDiversity.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
q
A number: the order of diversity. Default is 1.
Correction
A string containing one of the possible asymptotic estimators: "None" (no correction), "ChaoShen", "GenCov", "Grassberger", "Holste", "Bonachela", "ZhangGrabchak", or "ChaoJost", "Marcon", "UnveilC", "UnveiliC", "UnveilJ" or "Best", the default value. Currently, "Best" is "UnveilJ".
Level
The level of interpolation or extrapolation. It may be an a chosen 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" (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 diversity of the asymptotic distribution rarefied to the observed sample size equals the observed diversity of the data. Used only for extrapolation.
Additional arguments. Unused.
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
Diversity calls Tsallis to calculate entropy and transforms it into diversity by calculating its deformed exponential. Bias correction requires the number of individuals to estimate sample Coverage. See Tsallis for details. The functions are designed to be used as simply as possible. Diversity is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcDiversity is called. Diversity can be estimated at a specified level of interpolation or extrapolation, either a chosen sample size or sample coverage (Chao et al., 2014), rather than its asymptotic value. See Tsallis for details.
Value
A named number equal to the calculated diversity. The name is that of the bias correction used.
Examples
# 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)
See also
Tsallis, expq, AbdVector, ProbaVector
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. Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289.
Dqz
Similarity-based diversity of a community
CRAN · 1.6-16 · entropart/man/Dqz.Rd · 2026-05-07

Calculates the diversity of order q of a probability vector according to a similarity matrix.

Aliases
DqzbcDqzDqz.ProbaVectorDqz.AbdVectorDqz.integerDqz.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
q
A number: the order of diversity. Default is 1.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1. Default is the identity matrix to calculate neutral diversity.
Correction
A string containing one of the possible corrections: "None" (no correction), "HorvitzThomson", "MarconZhang" or "Best", the default value. The "MarconZhang" correction assumes a similarity matrix.
Additional arguments. Unused.
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
Diversity is calculated following Leinster and Cobbold (2012): it is the reciprocal of the (generalized) average (of order q) of the community species ordinariness. A similarity matrix is used (as for Dqz), not a distance matrix as in Ricotta and Szeidl (2006). See the example. Bias correction requires the number of individuals. Use bcHqz and choose the Correction. Correction techniques are from Marcon et al. (2014). Currently, the "Best" correction is the max value of "HorvitzThomson" and "MarconZhang". The functions are designed to be used as simply as possible. Dqz is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcDqz is called. Explicit calls to bcDqz (with bias correction) or to Dqz.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated diversity. The name is that of the bias correction used.
Examples
# 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)
See also
Hqz, PhyloDiversity
References
Leinster, T. and Cobbold, C. (2012). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
EightSpAbundance
Abundances of 8 species to run examples.
CRAN · 1.6-16 · data · entropart/man/EightSpAbundance.Rd · 2026-05-07

This dataset is a light-weight example.

Aliases
EightSpAbundance
Keywords
datasets
Usage
data(Paracou618)
Format
A named vector.
Examples
data(Paracou618) EightSpAbundance
EightSpTree
Functional tree with 8 species.
CRAN · 1.6-16 · data · entropart/man/EightSpTree.Rd · 2026-05-07

This dataset is a leight-weight example.

Aliases
EightSpTree
Keywords
datasets
Usage
data(Paracou618)
Format
An object of class [ade4]phylog containing a functional tree.
Examples
data(Paracou618) # Preprocess the tree to be able to plot it # without loading ade4 package plot(Preprocess.Tree(EightSpTree), hang=-0.01)
Enq
Grassberger's expectation of n^q
CRAN · 1.6-16 · entropart/man/Enq.Rd · 2026-05-07

Expected value of n^q when n follows a Poisson law.

Aliases
Enq
Usage
Enq(n, q)
Arguments
n
A positive integer vector.
q
A positive number.
Details
The expectation of n^q when n follows a Poisson ditribution has been derived by Grassberger (1988).
Value
A vector of the same length as n containing the transformed values.
Examples
# 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)
Note
The function is computed using the beta.function. Its value is 0 for n-q+1<0.
References
Grassberger, P. (1988). Finite sample corrections to entropy and dimension estimates. Physics Letters A 128(6-7): 369-373.
EntropyCI
Entropy of Monte-Carlo simulated communities
CRAN · 1.6-16 · entropart/man/EntropyCI.Rd · 2026-05-07

Resamples a community by Monte-Carlo simulations of a multinomial distribution and returns a vector of entropy values to calculate confidence intervals.

Aliases
EntropyCI
Usage
EntropyCI(FUN, Simulations = 100, Ns, BootstrapMethod = "Chao2015", ShowProgressBar = TRUE, , CheckArguments = TRUE)
Arguments
FUN
The entropy function to be applied to each simulated community. May be any entropy function accepting a vector of species abundances, such as bcTsallis, bcShannon, bcSimpson or bcPhyloEntropy.
Simulations
The number of simulations to build confidence intervals.
Ns
A numeric vector containing species abundances.
BootstrapMethod
The method used to obtain the probabilities to generate bootstrapped communities from observed abundances. See rCommunity.
Additional arguments to be passed to FUN.
ShowProgressBar
If TRUE (default), a progress bar is shown.
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
This function is used to obtain the distribution of entropy and eventually calculate confidence intervals. It draws simulated communities according to a multinomial distribution with the same number of individuals and probabilities as the actual community. It calculates the entropy of each simulated community. Last, it recenters the distribution of entropy values arounf the actual value of entropy according to Marcon et al. (2012): the estimation bias of simulated communities entropy can not be corrected analytically, but it does not affect the distribution shape. Diversity can not be recentered this way so diversity function should not be used. Unexpected results will be obtained if inappropriate functions are used.
Value
A numeric vector containing the entropy value of each simulated community.
Examples
# 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))
References
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.
GammaDiversity
Reduced-bias gamma diversity of a metacommunity
CRAN · 1.6-16 · entropart/man/GammaDiversity.Rd · 2026-05-07

Calculates the reduced-bias diversity of order q of a metacommunity.

Aliases
GammaDiversity
Usage
GammaDiversity(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, CheckArguments = TRUE)
Arguments
MC
A MetaCommunity object.
q
A number: the order of diversity. Default is 1.
Correction
A string containing one of the possible corrections accepted by AlphaEntropy or "None" or "Best", the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), diversity is not affected by the height of the tree. If FALSE, diversity is proportional to the height of the tree.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
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
Entropy is calculated by GammaEntropy and transformed into diversity.
Value
The metacommunity's gamma entropy.
Examples
# 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)
See also
GammaEntropy
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
GammaEntropy
Reduced-bias gamma entropy of a metacommunity
CRAN · 1.6-16 · entropart/man/GammaEntropy.Rd · 2026-05-07

Calculates the reduced-bias Tsallis entropy of order q of a metacommunity.

Aliases
GammaEntropy
Usage
GammaEntropy(MC, q = 1, Correction = "Best", Tree = NULL, Normalize = TRUE, Z = NULL, PhyloDetails = FALSE, CheckArguments = TRUE)
Arguments
MC
A MetaCommunity object.
q
A number: the order of entropy. Default is 1.
Correction
A string containing one of the possible corrections accepted by the bias-corrected entropy function (see details) or "None" or "Best", the default value.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), the entropy returned by the function is normalized by the height of the tree (it is the weighted average value of the entropy in each slice). If FALSE, it is the unnormalized weighted sum of the results.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1.
PhyloDetails
If FALSE (default), the function always returns a number. If TRUE and Tree is not Tree is not NULL then a PhyloValue object is returned with all details. That is used internally by DivPart to obtain the corrections used to estimate gamma entropy along the tree and apply them to the estimation of alpha diversity.
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
If Tree is not NULL, then phylogenetic entropy is calculated by bcPhyloEntropy. Else, if Z is not NULL, then similarity-based entropy is calculated by bcHqz. Else, neutral entropy is calculated by bcTsallis.
Value
A number equal to the calculated entropy.
Examples
# 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)
See also
bcTsallis, bcPhyloEntropy
References
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., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
GenSimpson
Generalized Simpson's Entropy and Diversity
CRAN · 1.6-16 · entropart/man/GenSimpson.Rd · 2026-05-07

Calculates the Generalized Simpson's entropy of order r of a probability or abundance vector, and its effective number of species.

Aliases
GenSimpsonbcGenSimpsonGenSimpson.ProbaVectorGenSimpson.AbdVectorGenSimpson.integerGenSimpson.numericGenSimpsonDbcGenSimpsonDGenSimpsonD.ProbaVectorGenSimpsonD.AbdVectorGenSimpsonD.integerGenSimpsonD.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
r
A number: the order of diversity. Default is 1 for Simpson's diversity.
Additional arguments. Unused.
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 Generalized Simpson's Entropy (Zhang and Zhou, 2010) of order r is, in the species accumulation curve, the probability for the individual sampled in rank r+1 to belong to a new species. It is a measure of diversity so long as r is lower than the number of species (Grabchak et al., 2016). Bias correction requires the number of individuals. Use bcGenSimpson. It is limited to orders r less than or equal to the number of individuals in the community. The effective number of species GenSimpsonD (explicit diversity) has been derived by Grabchak et al. (2016). The functions are designed to be used as simply as possible. GenSimpson is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcGenSimpson is called. Explicit calls to bcGenSimpson (with bias correction) or to GenSimpson.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated index or diversity. The name is either "Biased" or "Unbiased", depending on the estimator used.
Examples
# 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)
Note
The unbiased estimator is calculated by the [EntropyEstimation]GenSimp.z function of the EntropyEstimation package.
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. Zhang Z. and Zhou J. (2010). Re-parameterization of multinomial distributions and diversity indices. Journal of Statistical Planning and Inference 140(7): 1731-1738.
Hqz
Similarity-based entropy of a community
CRAN · 1.6-16 · entropart/man/Hqz.Rd · 2026-05-07

Calculates the entropy of order q of a probability vector according to a similarity matrix.

Aliases
HqzbcHqzHqz.ProbaVectorHqz.AbdVectorHqz.integerHqz.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
q
A number: the order of entropy. Default is 1.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1. Default is the identity matrix to calculate neutral entropy.
Correction
A string containing one of the possible corrections: "None" (no correction), "ChaoShen", "MarconZhang" or "Best", the default value. The "MarconZhang" correction assumes a similarity matrix.
SampleCoverage
The sample coverage of Ns calculated elsewhere. Used to calculate the gamma diversity of meta-communities, see details.
Additional arguments. Unused.
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
Entropy is calculated following Leinster and Cobbold (2012) after Ricotta and Szeidl (2006): it is the entropy of order q of the community, using species ordinariness as the information function. A similarity matrix is used (as for Dqz), not a distance matrix as in Ricotta and Szeidl (2006). See the example. Bias correction requires the number of individuals. Use bcHqz and choose the Correction. Correction techniques are from Marcon et al. (2014). Currently, the "Best" correction is the max value of "ChaoShen" and "MarconZhang". The functions are designed to be used as simply as possible. Hqz is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcHqz is called. Explicit calls to bcHqz (with bias correction) or to Hqz.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility. The size of a metacommunity (see MetaCommunity) is unknown so it has to be set according to a rule which does not ensure that its abundances are integer values. Then, classical bias-correction methods do not apply. Providing the SampleCoverage argument allows applying the "ChaoShen" correction to estimate quite well the entropy. DivPart and GammaEntropy functions use this tweak.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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))
See also
Dqz, PhyloEntropy
References
Leinster, T. and Cobbold, C. (2012). Measuring diversity: the importance of species similarity. Ecology 93(3): 477-489. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3). Ricotta, C. and Szeidl, L. (2006). Towards a unifying approach to diversity measures: Bridging the gap between the Shannon entropy and Rao's quadratic index. Theoretical Population Biology 70(3): 237-243.
HqzBeta
Similarity-based beta entropy of a community
CRAN · 1.6-16 · entropart/man/HqzBeta.Rd · 2026-05-07

Calculates the similarity-based beta entropy of order q of a community belonging to a metacommunity.

Aliases
HqzBetabcHqzBetaHqzBeta.ProbaVectorHqzBeta.AbdVectorHqzBeta.integerHqzBeta.numeric
Usage
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)
Arguments
Ps
The probability vector of species of the community.
Pexp
The probability vector of species of the metacommunity.
Ns
A numeric vector containing species abundances of the community.
Nexp
A numeric vector containing species abundances of the metacommunity.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the community.
NorPexp
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the metacommunity.
q
A number, the order of diversity. Default is 1.
Z
A relatedness matrix, i.e. a square matrix whose terms are all positive, strictly positive on the diagonal. Generally, the matrix is a similarity matrix, i.e. the diagonal terms equal 1 and other terms are between 0 and 1. Default is the identity matrix to calculate neutral entropy.
Correction
A string containing one of the possible corrections: currently, no correction is available so "Best", the default value, is equivalent to "None".
Additional arguments. Unused.
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 derivation of similarity-based beta entropy can be found in Marcon et al. (2014). Bias correction requires the number of individuals. Note that beta entropy value is related to alpha entropy (if q is not 1) and cannot be compared accross communities (Jost, 2007). Beta entropy of a community is not meaningful in general, do rather calculate the BetaDiversity of the metacommunity. The functions are designed to be used as simply as possible. HqzBeta is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcHqzBeta is called. Explicit calls to bcHqzBeta (with bias correction) or to HqzBeta.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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)
References
Jost (2007), Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439. Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
Hurlbert
Hurlbert's Index and Explicit Diversity
CRAN · 1.6-16 · entropart/man/Hurlbert.Rd · 2026-05-07

Calculates the Hurlbert entropy of order k of a probability or abundance vector, and its effective number of species.

Aliases
HurlbertbcHurlbertHurlbert.ProbaVectorHurlbert.AbdVectorHurlbert.integerHurlbert.numericHurlbertDbcHurlbertDHurlbertD.ProbaVectorHurlbertD.AbdVectorHurlbertD.integerHurlbertD.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
k
A number: the order of diversity. Default is 2 for Simpson's diversity.
Additional arguments. Unused.
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
Hurlbert's index of diversity (1971) of order k is the expected number of species in a sample of size k. Bias correction requires the number of individuals. Use bcHurlbert. It is limited to orders k less than or equal to the number of individuals in the community. The effective number of species HurlbertD (explicit diversity) has been derived by Dauby & Hardy (2012). It is calculated numerically. bcHurlbertD calculates it from the bias-corrected index bcHurlbert. The functions are designed to be used as simply as possible. Hurlbert is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcHurlbert is called. Explicit calls to bcHurlbert (with bias correction) or to Hurlbert.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated index or diversity. The name is either "Biased" or "Unbiased", depending on the estimator used.
Examples
# 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)
References
Dauby G. & Hardy O.J. (2012) Sampled-based estimation of diversity sensu stricto by transforming Hurlbert diversities into effective number of species. Ecography 35(7): 661-672. Hurlbert (1971) The Nonconcept of Species Diversity: A Critique and Alternative Parameters. Ecology 52(4): 577-586.
KLq
Generalized Kullback-Leibler divergence
CRAN · 1.6-16 · entropart/man/KLq.Rd · 2026-05-07

Calculates the generalized Kullback-Leibler divergence between an observed and an expected probability distribution.

Aliases
KLq
Usage
KLq(Ps, Pexp, q = 1, CheckArguments = TRUE)
Arguments
Ps
The observed probability vector.
Pexp
The expected probability vector.
q
A number: the order of entropy. Default is 1.
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 generalized Kullback-Leibler divergence (Borland et al., 1998) converges to the Kullback-Leibler divergence (Kullback and Leibler, 1951) when q tends to 1. It is used to calculate the generalized beta entropy (Marcon et al., 2014).
Value
A number equal to the generalized Kullback-Leibler divergence between the probability distributions.
Examples
# 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)
See also
TsallisBeta
References
Borland, L., Plastino, A. R. and Tsallis, C. (1998). Information gain within nonextensive thermostatistics. Journal of Mathematical Physics 39(12): 6490-6501. Kullback, S. and Leibler, R. A. (1951). On Information and Sufficiency. The Annals of Mathematical Statistics 22(1): 79-86. Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289.
MC Utilities
Manipulation of meta-communities
CRAN · 1.6-16 · entropart/man/MergeMC.Rd · 2026-05-07

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.

Aliases
MergeMCMergeCShuffleMC
Usage
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)
Arguments
MClist
A list of MetaCommunity objects.
Weights
A vector of numbers containing the weight of each metacommunity of the list. It does not have to be normalized to sum to 1.
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
MergeMC is used for hierarchical partitioning of diversity. The gamma diversity of communities of the list becomes alpha diversity of the merged meta-community. MergeC creates a new meta-community by mixing original ones. Original communities are kept, their new weight is the product of their original weight and the weight of their original meta-community. ShuffleMC is used for simulations of the null hypothesis that all metacommunities of the list are identical.
Value
MergeMC and MergeC return a MetaCommunity. ShuffleMC returns a list of MetaCommunity objects.
Examples
# 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")
See also
MetaCommunity
MCdiversity
Meta-Community diversity class.
CRAN · 1.6-16 · entropart/man/MCdiversity.Rd · 2026-05-07

Methods for objects of type "MCdiversity".

Aliases
MCdiversityis.MCdiversityplot.MCdiversityautoplot.MCdiversitysummary.MCdiversity
Usage
is.MCdiversity(x) plotMCdiversity(x, ) autoplotMCdiversity(object, col = "grey35", border = NA, ) summaryMCdiversity(object, )
Arguments
x
An object to be tested or plotted.
object
A MCdiversity object to be summarized or plotted.
col
The color used to fill the bars. See "Color Specification" in par.
border
The color of the borders around the bars. See hist.
Additional arguments to be passed to the generic methods.
Value
Meta-community diversity objects are lists containing: MetaCommunityThe name of the MetaCommunity object containing inventory data. TypeThe type of diversity ("alpha", "beta" or "gamma"). OrderThe order of diversity q. CorrectionThe estimation bias correction used to calculate diversity. TreeThe phylogenetic or functional tree used to calculate phylodiversity. NormalizedLogical. Indicates whether phylodiversity is normalized or proportional to the height of the tree. WeightsA vector containing the weights of communities. CommunitiesA vector containing the diversity of communities. TotalThe total diversity. is.MCdiversity returns TRUE if the object is of class MCdiversity. summary.MCdiversity returns a summary of the object's value.
MCentropy
Meta-Community entropy class.
CRAN · 1.6-16 · entropart/man/MCentropy.Rd · 2026-05-07

Methods for objects of type "MCentropy".

Aliases
MCentropyis.MCentropyplot.MCentropyautoplot.MCentropysummary.MCentropy
Usage
is.MCentropy(x) plotMCentropy(x, ) autoplotMCentropy(object, col = "grey35", border = NA, ) summaryMCentropy(object, )
Arguments
x
An object to be tested or plotted.
object
A MCentropy object to be summarized or plotted.
col
The color used to fill the bars. See "Color Specification" in par.
border
The color of the borders around the bars. See hist.
Additional arguments to be passed to the generic methods.
Value
Meta-community entropy objects are lists containing: MetaCommunityThe name of the MetaCommunity object containing inventory data. MethodThe method used to calculate entropy ("HCDT", "Similarity-based"). TypeThe type of entropy ("alpha", "beta" or "gamma"). OrderThe order of entropy q. CorrectionThe estimation bias correction used to calculate entropy. TreeThe phylogenetic or functional tree used to calculate phyloentropy. NormalizedLogical. Indicates whether phyloentropy is normalized or proportional to the height of the tree. ZThe matrix used to calculate similarity-based entropy. WeightsA vector containing the weights of communities. CommunitiesA vector containing the entropy of communities. TotalThe total entropy. is.MCentropy returns TRUE if the object is of class MCentropy. summary.MCentropy returns a summary of the object's value.
MetaCommunity
Metacommunity class
CRAN · 1.6-16 · entropart/man/MetaCommunity.Rd · 2026-05-07

Methods for objects of type "MetaCommunity".

Aliases
MetaCommunityis.MetaCommunityplot.MetaCommunitysummary.MetaCommunity
Usage
MetaCommunity(Abundances, Weights = rep(1, ncol(Abundances))) is.MetaCommunity(x) summaryMetaCommunity(object, ) plotMetaCommunity(x, )
Arguments
Abundances
A dataframe containing the number of observations (lines are species, columns are communities). The first column of the dataframe may contain the species names.
Weights
A vector of positive numbers equal to community weights or a dataframe containing a vector named Weights. It does not have to be normalized. Weights are equal by default.
x
An object to be tested or plotted.
object
A MetaCommunity object to be summarized.
Additional arguments to be passed to the generic methods.
Details
In the entropart package, individuals of different "species" are counted in several "communities" which are agregated to define a "metacommunity". This is a naming convention, which may correspond to plots in a forest inventory or any data organized the same way. Alpha and beta entropies of communities are summed according to Weights and the probability to find a species in the metacommunity is the weighted average of probabilities in communities. 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)
Value
An object of class MetaCommunity is a list: NsiA matrix containing abundance data, species in line, communities in column. NsA vector containing the number of individuals of each species. NiA vector containing the number of individuals of each community. NThe total number of individuals. PsiA matrix whose columns are the probability vectors of communities (each of them sums to 1). WiA vector containing the normalized community weights (sum to 1). PsA vector containing the probability vector of the metacommunity. NspeciesThe number of species. NcommunitiesThe number of communities. SampleCoverageThe sample coverage of the metacommunity. SampleCoverage.communitiesA vector containing the sample coverages of each community. is.MetaCommunity returns TRUE if the object is of class MetaCommunity. summary.MetaCommunity returns a summary of the object's value. plot.MetaCommunity plots it.
Examples
# 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)
Optimal.Similarity
Optimal scale parameter to transform a distance matrix into a similarity matrix
CRAN · 1.6-16 · entropart/man/Optimal.Similarity.Rd · 2026-05-07

Calculates the scale parameter u that maximizes the variance of the similarity matrix exp(-u*DistanceMatrix).

Aliases
Optimal.Similarity
Usage
Optimal.Similarity(Distance, CheckArguments = TRUE)
Arguments
Distance
A distance matrix, i.e. a square matrix with zeros on its diagonal or a dist object.
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 similarity matrix used by Dqz) can be optimized following Marcon et al. (2014) such that the variance of similarities between pairs of species is maximized. See the example.
Value
A list: uThe optimal scale u. MatrixThe optimal similarity matrix Z.
Examples
# 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)
See also
Dqz
References
Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 3).
PDFD
Phylogenetic Diversity / Functional Diversity of a Community
CRAN · 1.6-16 · entropart/man/PDFD.Rd · 2026-05-07

Calculates Faith's PD / Petchey and Gaston' FD of a community described by a probability vector and a phylogenetic / functional tree.

Aliases
PDFD
Usage
PDFD(Ps, Tree, CheckArguments = TRUE)
Arguments
Ps
A probability vector, summing to 1.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
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
PD and FD are defined as the total legth of the branches of the tree. The probability vector is used to select branches: branches with probability 0 are eliminated. Bias correction requires the number of individuals to estimate sample Coverage. Use bcPhyloDiversity(Ps, 0, Tree) and choose the Correction.
Value
A named number equal to the calculated diversity. The name is that of the bias correction used.
Examples
# 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)
See also
bcPhyloDiversity
References
Faith, D. P. (1992). Conservation evaluation and phylogenetic diversity. Biological Conservation 61(1): 1-10. Petchey, O. L. and Gaston, K. J. (2002). Functional diversity (FD), species richness and community composition. Ecology Letters 5: 402-411.
PPtree
Preprocessed Trees.
CRAN · 1.6-16 · entropart/man/PPtree.Rd · 2026-05-07

Methods for objects of type "PPtree".

Aliases
PPtreeis.PPtreeplot.PPtree
Usage
is.PPtree(x) plotPPtree(x, )
Arguments
x
An object to be tested or plotted
Additional arguments to be passed to the generic methods.
Value
An object of class PPtree is a list: phyTreeA "phylo" (see [ape]read.tree) tree hTreeA hclust tree HeightThe height of the tree, that is to say the distance between root and leaves CutsA vector. Cut times of the tree (the distance from nodes to leaves) IntervalsA vector. The lengths of intervals between cuts is.PPtree returns TRUE if the object is of class PPtree. plot.PPtree plots it.
Examples
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)
Note
Versions up to 1.3 contained a [ade4]phylog tree, now deprecated in ade4. A "phylo" (see [ape]read.tree) tree is now used. See the dedicated vignette (vignette("Phylogenies", package="entropart")) for more details.
Paracou618.Functional
Functional tree of species of Paracou field station plots 6 and 18, two 1-ha plots inventoried by the Bridge project.
CRAN · 1.6-16 · data · entropart/man/Paracou618.Functional.Rd · 2026-05-07

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.

Aliases
Paracou618.Functional
Keywords
datasets
Usage
data(Paracou618)
Format
An object of class hclust.
Source
Permanent data census of Paracou.
Examples
data(Paracou618) plot(Paracou618.Functional)
References
Gourlet-Fleury, S., Guehl, J. M. and Laroussinie, O., Eds. (2004). Ecology & management of a neotropical rainforest. Lessons drawn from Paracou, a long-term experimental research site in French Guiana. Paris, Elsevier. Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Paine, C. E. T., Baraloto, C., Chave, J., and Herault, B. (2011). Functional traits of individual trees reveal ecological constraints on community assembly in tropical rain forests. Oikos, 120(5), 720-727.
Paracou618.MC
Paracou field station plots 6 and 18, two 1-ha plots inventoried by the Bridge project.
CRAN · 1.6-16 · data · entropart/man/Paracou618.MC.Rd · 2026-05-07

This dataset is from Paracou field station, French Guiana, managed by https://www.cirad.frCirad.

Aliases
Paracou618.MC
Keywords
datasets
Usage
data(Paracou618)
Format
An object of class MetaCommunity made of two communities and 425 species.
Source
Permanent data census of Paracou and Marcon et al. (2012).
Examples
data(Paracou618) summary(Paracou618.MC)
References
Gourlet-Fleury, S., Guehl, J. M. and Laroussinie, O., Eds. (2004). Ecology & management of a neotropical rainforest. Lessons drawn from Paracou, a long-term experimental research site in French Guiana. Paris, Elsevier. Marcon, E., F. Puech, et al. (2012). Characterizing the relative spatial structure of point patterns. International Journal of Ecology 2012(Article ID 619281): 11.
Paracou618.Taxonomy
Taxonomy (Family - Genus - Species) of Paracou field station plots 6 and 18, two 1-ha plots inventoried by the Bridge pr...
CRAN · 1.6-16 · data · entropart/man/Paracou618.Taxonomy.Rd · 2026-05-07

This dataset is from Paracou field station, French Guiana, managed by https://www.cirad.frCirad.

Aliases
Paracou618.Taxonomy
Keywords
datasets
Usage
data(Paracou618)
Format
An object of class "phylo" (see [ape]read.tree) containing a taxonomy.
Source
Permanent data census of Paracou.
Examples
data(Paracou618) plot(Paracou618.Taxonomy, type="fan", show.tip.label=FALSE)
References
Gourlet-Fleury, S., Guehl, J. M. and Laroussinie, O., Eds. (2004). Ecology & management of a neotropical rainforest. Lessons drawn from Paracou, a long-term experimental research site in French Guiana. Paris, Elsevier.
Paracou618.dist
Functional distances between pairs of species of Paracou field station plots 6 and 18, two 1-ha plots inventoried by the...
CRAN · 1.6-16 · data · entropart/man/Paracou618.dist.Rd · 2026-05-07

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).

Aliases
Paracou618.dist
Keywords
datasets
Usage
data(Paracou618)
Format
An object of class dist.
Source
Permanent data census of Paracou.
Examples
data(Paracou618) plot(density(Paracou618.dist, from=0), main="Distances between species")
References
Gourlet-Fleury, S., Guehl, J. M. and Laroussinie, O., Eds. (2004). Ecology & management of a neotropical rainforest. Lessons drawn from Paracou, a long-term experimental research site in French Guiana. Paris, Elsevier. Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Paine, C. E. T., Baraloto, C., Chave, J., and Herault, B. (2011). Functional traits of individual trees reveal ecological constraints on community assembly in tropical rain forests. Oikos, 120(5), 720-727.
PhyloApply
Apply a Function over a Phylogenetic Tree
CRAN · 1.6-16 · entropart/man/PhyloApply.Rd · 2026-05-07

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.

Aliases
PhyloApply
Usage
PhyloApply(Tree, FUN, NorP, Normalize = TRUE, dfArgs = NULL, , CheckArguments = TRUE)
Arguments
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
FUN
The function to be applied to each interval of the tree.
NorP
A numeric vector or a two-column matrix. Contains either abundances or probabilities. Two-column matrices should contain the observed abundances (or probabilities) in the first column and the expected ones in the second column, to allow using beta diversity functions.
Normalize
If TRUE (default), the Total value returned by Function is normalized by the height of the tree (it is the weighted average value of the result in each slice). If FALSE, it is the unnormalized weighted sum of the results.
dfArgs
A dataframe. Columns are arguments for FUN: their names are those of valid arguments. Values will be passed to FUN in each slice of the tree, starting from the tips. The number of lines must equal the number of slices.
Further arguments to pass to Function.
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
This funtion is generally not used directly. It is a tool to calculate PhyloEntropy and PhyloDiversity. Intervals (slices) separate two cuts (nodes) in a tree: no node is found at heights contained in an interval. Objects of class PPtree are returned by Preprocess.Tree. allow passing arguments to the function but they can't change along the tree. If necessary, dfArgs allow passing a different value for each slice of the tree.
Value
An object of class PhyloValue. It is a list: DistributionThe distribution used to calculate the value FunctionThe function used to calculate the value TreeThe functional or phylogenetic tree used to calculate the value NormalizedLogical. Indicates whether phylovalue is normalized or proportional to the height of the tree. CutsA named vector containing values along the tree. Names are cut ends, i.e. the ends of intervals (the first interval starts at 0 for leaves, the max value is the height of the tree). CorrectionsA named vector containing the correction used by FUN to obtain each value of Cuts. Names are those of Cuts. TotalThe total value, multiplied by the tree height if Normalize is FALSE.
Examples
# 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))
See also
Preprocess.Tree
References
Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339.
PhyloBetaEntropy
Phylogenetic Beta Entropy of a community
CRAN · 1.6-16 · entropart/man/PhyloBetaEntropy.Rd · 2026-05-07

Calculates the phylogenetic beta entropy of order q of a a community belonging to a metacommunity.

Aliases
PhyloBetaEntropybcPhyloBetaEntropyPhyloBetaEntropy.ProbaVectorPhyloBetaEntropy.AbdVectorPhyloBetaEntropy.integerPhyloBetaEntropy.numeric
Usage
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)
Arguments
Ps
The probability vector of species of the community.
Pexp
The probability vector of species of the metacommunity.
Ns
A numeric vector containing species abundances of the community.
Nexp
A numeric vector containing species abundances of the metacommunity.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the community.
NorPexp
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the metacommunity.
q
A number: the order of entropy. Default is 1.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), the entropy returned by the function is normalized by the height of the tree (it is the weighted average value of the entropy in each slice). If FALSE, it is the unnormalized weighted sum of the results.
Correction
A string containing one of the possible corrections: currently, only "ChaoShen". "Best" is the default value, it is equivalent to "ChaoShen".
Additional arguments. Unused.
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 phylogenetic entropy is the generalization of HCDT entropy to unequal species distances (Pavoine et al., 2009). Calculation relies on TsallisBeta and PhyloApply. Bias correction requires the number of individuals to estimate sample Coverage. Use bcPhyloBetaEntropy and choose the Correction. Note that beta entropy value is related to alpha entropy (if q is not 1) and cannot be compared accross communities (Jost, 2007). Beta entropy of a community is not meaningful in general, do rather calculate the PhyloDiversity of the metacommunity. The functions are designed to be used as simply as possible. PhyloBetaEntropy is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcPhyloBetaEntropy is called. Explicit calls to bcPhyloBetaEntropy (with bias correction) or to PhyloBetaEntropy.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A PhyloEntropy object containing entropy values at each cut of the tree.
Examples
# 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)
See also
TsallisBeta, bcPhyloBetaEntropy, PhyloDiversity
References
Jost (2007), Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439. Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Pavoine, S., Love, M. S. and Bonsall, M. B. (2009). Hierarchical partitioning of evolutionary and ecological patterns in the organization of phylogenetically-structured species assemblages: Application to rockfish (genus: Sebastes) in the Southern California Bight. Ecology Letters 12(9): 898-908.
PhyloDiversity
Phylogenetic Diversity of a Community
CRAN · 1.6-16 · entropart/man/PhyloDiversity.Rd · 2026-05-07

Calculates the phylogenetic diversity of order q of a probability vector.

Aliases
PhyloDiversitybcPhyloDiversityPhyloDiversity.ProbaVectorPhyloDiversity.AbdVectorPhyloDiversity.integerPhyloDiversity.numericis.PhyloDiversitysummary.PhyloDiversity
Usage
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, )
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
q
A number: the order of diversity. Default is 1.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), the Total diversity is not affected by the height of the tree. If FALSE, it is proportional to the height of the tree.
Correction
A string containing one of the possible corrections: "None" (no correction), "ChaoShen", "Grassberger", "Holste", "Bonachela" or "Best", the default value.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.
x
An object to be tested or plotted
object
A PhyloDiversity object to be summarized.
Additional arguments to be passed to the generic methods.
Details
The phylogenetic entropy is its generalization of HCDT entropy to unequal species distances (Pavoine et al., 2009). Diversity is obtained by transforming generalized entropy. Bias correction requires the number of individuals to estimate sample Coverage. Use bcPhyloDiversity and choose the Correction. The functions are designed to be used as simply as possible. PhyloDiversity is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcPhyloDiversity is called. Explicit calls to bcPhyloDiversity (with bias correction) or to PhyloDiversity.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
An object of class PhyloDiversity is a list: DistributionThe distribution used to calculate diversity FunctionThe function used to calculate diversity TreeThe functional or phylogenetic tree used to calculate diversity NormalizedLogical. Indicates whether phylodiversity is normalized or proportional to the height of the tree. TypeThe type of diversity ("alpha", "beta" or "gamma"). OrderThe order of diversity q. CutsA named vector containing values of neutral diversity along the tree. Names are cut ends, i.e. the ends of intervals (the first interval starts at 0 for leaves, the max value is the height of the tree). TotalA value equal the total diversity (obtained by transforming the total normalized entropy), multiplied by the tree height if Normalize is FALSE. is.PhyloDiversity returns TRUE if the object is of class PhyloDiversity. summary.PhyloDiversity returns a summary of the object's value. PhyloDiversity objects can be plotted by plot.PhyloValue because PhyloDiversity objects are also of class PhyloValue.
Examples
# 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)
See also
PhyloEntropy, Diversity
Note
The tree must contain all species of the probability vector. If it contains extra species, computation time will just be increased.
References
Chao, A., Chiu, C.-H. and Jost, L. (2010). Phylogenetic diversity measures based on Hill numbers. Philosophical Transactions of the Royal Society B 365(1558): 3599-609. Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Pavoine, S., Love, M. S. and Bonsall, M. B. (2009). Hierarchical partitioning of evolutionary and ecological patterns in the organization of phylogenetically-structured species assemblages: Application to rockfish (genus: Sebastes) in the Southern California Bight. Ecology Letters 12(9): 898-908.
PhyloEntropy
Phylogenetic Entropy of a community
CRAN · 1.6-16 · entropart/man/PhyloEntropy.Rd · 2026-05-07

Calculates the phylogenetic entropy of order q of a probability vector.

Aliases
PhyloEntropybcPhyloEntropyPhyloEntropy.ProbaVectorPhyloEntropy.AbdVectorPhyloEntropy.integerPhyloEntropy.numericis.PhyloEntropysummary.PhyloEntropy
Usage
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, )
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
q
A number: the order of entropy. Default is 1.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Normalize
If TRUE (default), the Total entropy returned by the function is normalized by the height of the tree (it is the weighted average value of the entropy in each slice). If FALSE, it is the unnormalized weighted sum of the results.
Correction
A string containing one of the possible corrections supported by Tsallis.
SampleCoverage
The sample coverage of Ns calculated elsewhere. Used to calculate the gamma diversity of meta-communities, see details.
CheckArguments
Logical; if TRUE, the function arguments are verified. Should be set to FALSE to save time when the arguments have been checked elsewhere.
x
An object to be tested or plotted
object
A PhyloEntropy object to be summarized.
Additional arguments to be passed to the generic methods.
Details
The phylogenetic entropy is its generalization of HCDT entropy to unequal species distances (Pavoine et al., 2009). Calculation relies on Tsallis and PhyloApply. Intervals separate two cuts in a tree: no node is found at heights contained in an interval. Bias correction requires the number of individuals to estimate sample Coverage. Use bcPhyloEntropy and choose the Correction. The functions are designed to be used as simply as possible. PhyloEntropy is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcPhyloEntropy is called. Explicit calls to bcPhyloEntropy (with bias correction) or to PhyloEntropy.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility. The size of a metacommunity (see MetaCommunity) is unknown so it has to be set according to a rule which does not ensure that its abundances are integer values. Then, classical bias-correction methods do not apply. Providing the SampleCoverage argument allows applying the "ChaoShen" and "Grassberger" corrections to estimate quite well the entropy. DivPart and GammaEntropy functions use this tweak.
Value
An object of class PhyloEntropy is a list: DistributionThe distribution used to calculate entropy FunctionThe function used to calculate entropy TreeThe functional or phylogenetic tree used to calculate entropy NormalizedLogical. Indicates whether phyloentropy is normalized or proportional to the height of the tree. TypeThe type of entropy ("alpha", "beta" or "gamma"). OrderThe order of entropy q. CutsA named vector containing values of neutral entropy along the tree. Names are cut ends, i.e. the ends of intervals (the first interval starts at 0 for leaves, the max value is the height of the tree). TotalA value equal the total entropy multiplied by the tree height if Normalize is FALSE. is.PhyloEntropy returns TRUE if the object is of class PhyloEntropy. summary.PhyloEntropy returns a summary of the object's value. PhyloEntropy objects can be plotted by plot.PhyloValue because PhyloEntropy objects are also of class PhyloValue.
Examples
# 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)
See also
Tsallis, PhyloDiversity
Note
The tree must contain all species of the probability vector. If it contains extra species, computation time will just be increased.
References
Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Pavoine, S., Love, M. S. and Bonsall, M. B. (2009). Hierarchical partitioning of evolutionary and ecological patterns in the organization of phylogenetically-structured species assemblages: Application to rockfish (genus: Sebastes) in the Southern California Bight. Ecology Letters 12(9): 898-908.
PhyloValue
Phylogenetic entropy or diversity.
CRAN · 1.6-16 · entropart/man/PhyloValue.Rd · 2026-05-07

Entropy or diversity against the height of the phylogenetic or functional tree.

Aliases
PhyloValueis.PhyloValueautoplot.PhyloValueplot.PhyloValuesummary.PhyloValue
Usage
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, )
Arguments
x
An object of class PhyloValue, including PhyloDiversity and PhyloEntropy objects.
xlab
The X axis label, "T" by default for Time.
ylab
The Y axis label. if NULL (by default), "Entropy" or "Diversity" or nothing is chosen according to the object class.
main
The main title of the plot. if NULL (by default), a default value is used.
object
A PhyloValue object to be summarized.
col
The color of the geom objects. See "Color Specification" in par.
lty
The type of the lines. See lines.
lwd
The width of the lines. See lines.
Additional arguments to be passed to plot.
Details
PhyloValue objects are the result of PhyloApply.
Examples
# 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)
Preprocess.MC
Preprocessing of metacommunity data
CRAN · 1.6-16 · entropart/man/Preprocess.MC.Rd · 2026-05-07

Calculates summary statistics of a metacommunity

Aliases
Preprocess.MC
Keywords
internal
Usage
Preprocess.MC(Nsi, Wi)
Arguments
Nsi
A matrix containing abundance data, species in line, communities in column.
Wi
Normalized community weights (sum to 1).
Details
This is an internal function. It is used by MetaCommunity for real data and DivEst for simulations.
Value
An object of class MetaCommunity. It is a list: NsiA matrix containing abundance data, species in line, communities in column NspeciesThe number of species NcommunitiesThe number of communities WiNormalized community weights (sum to 1) NThe total number of individuals NiA vector containing the number of individuals of each community NsA vector containing the number of individuals of each species PsiA matrix whose columns are the probability vectors of communities (each of them sums to 1) PsA vector containing the probability vector of the metacommunity SampleCoverageThe sample coverage of the metacommunity SampleCoverage.communitiesA vector containing the sample coverages of each community
Author
Eric Marcon <Eric.Marcon@ecofog.gf>
Preprocess.Tree
Preprocessing of a phylogenetic tree
CRAN · 1.6-16 · entropart/man/Preprocess.Tree.Rd · 2026-05-07

Calculates cuts and intervals of a phylogenetic tree and make it available both in hclust and "phylo" (see [ape]read.tree) formats.

Aliases
Preprocess.Tree
Keywords
internal
Usage
Preprocess.Tree(Tree)
Arguments
Tree
An object of class hclust, "phylo" (see [ape]read.tree) or [ade4]phylog. The tree must be ultrametric.
Details
This is an internal function. It is used by PhyloApply to obtain values of intervals.
Value
An object of class PPtree.
RAC
Fit Distributions to Well-Known Rank Abundance Curves.
CRAN · 1.6-16 · entropart/man/RAC.Rd · 2026-05-07

Observed distributions are fitted to classical RAC's.

Aliases
RAClnormRACgeomRAClseriesRACbstick
Usage
RAClnorm(Ns, CheckArguments = TRUE) RACgeom(Ns, CheckArguments = TRUE) RAClseries(Ns, CheckArguments = TRUE) RACbstick(Ns, CheckArguments = TRUE)
Arguments
Ns
A numeric vector containing species abundances.
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
SpeciesDistribution or integer vectors can be used to fit classical rank-abundance curves (RAC) of classical distributions: "RAClnorm" for log-normal (Preston, 1948), "RAClseries" for log-series (Fisher et al., 1943), "RACgeom" for geometric (Motomura, 1932) or "RACbstick" for broken stick (MacArthur, 1957). method returns the estimated parameters of the fitted distribution. The broken stick has no parameter, so the maximum abundance is returned.
Value
A list (the parameters of distributions are returned only if the distribution has been fit): RankA numeric vector. The ranks of species in the fitted RAC. AbundanceThe abundance of species in the fitted RAC. muThe expectation of the log-normal distribution sigmaThe standard deviation of the log-normal distribution alphaFisher's alpha in the log-series distribution probThe proportion of ressources taken by successive species in the geometric distribution maxThe maximum abundance in the broken-stick distribution
Examples
# 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)$max
See also
rgeom, rlnorm, rCommunity, plot.SpeciesDistribution
Note
Fisher's alpha is estimated to fit the log-series distribution. The estimation is done by the [vegan]fisher.alpha function of package vegan. It may differ substantially from the estimation returned by optimal.theta from package untb.
Author
Eric Marcon <Eric.Marcon@agroparistech.fr>, Bruno Herault <Bruno.Herault@cirad.fr>
References
Fisher R.A., Corbet A.S., Williams C.B. (1943) The Relation Between the Number of Species and the Number of Individuals in a Random Sample of an Animal Population. Journal of Animal Ecology 12: 42-58. MacArthur R.H. (1957) On the Relative Abundance of Bird Species. PNAS 43(3): 293-295. Motomura I. (1932) On the statistical treatment of communities. Zoological Magazine 44: 379-383. Preston, F.W. (1948). The commonness, and rarity, of species. Ecology 29(3): 254-283.
Rao
Rao Quadratic Entropy of a Community
CRAN · 1.6-16 · entropart/man/Rao.Rd · 2026-05-07

Calculates Rao's quadratic entropy of a community described by a probability vector and a phylogenetic / functional tree.

Aliases
RaobcRaoRao.ProbaVectorRao.AbdVectorRao.integerRao.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
Tree
An object of class hclust, "phylo" (see [ape]read.tree), [ade4]phylog or PPtree. The tree must be ultrametric.
Correction
A string containing one of the possible corrections accepted by bcTsallis or "Lande", the default value (equivalent to "Best").
Additional arguments. Unused.
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
Bias correction requires the number of individuals. Use bcRao and choose the Correction. The unbiased estimator of Rao's entropy is identical to that of Simpson's entropy because Rao's entropy is a linear sum of Simson entropies, all of them calculated from the same number of individuals (Marcon and Herault, 2014). It equals the plug-in etimator multiplied by n/(n-1) where n is the total number of individuals. The functions are designed to be used as simply as possible. Tsallis is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcTsallis is called. Explicit calls to bcTsallis (with bias correction) or to Tsallis.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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)
See also
bcPhyloDiversity
References
Marcon, E., Herault, B. (2015). Decomposing Phylodiversity. Methods in Ecology and Evolution 6(3): 333-339. Rao, C. R. (1982). Diversity and dissimilarity coefficients: a unified approach. Theoretical Population Biology 21: 24-43.
Richness
Number of species of a community
CRAN · 1.6-16 · entropart/man/Richness.Rd · 2026-05-07

Calculates the number of species from probability vector. The name is that of the estimator (the bias correction) used.

Aliases
bcRichnessRichnessRichness.ProbaVectorRichness.AbdVectorRichness.integerRichness.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
Correction
A string containing one of the possible corrections: "None" (no correction), "Jackknife", "iChao1", or "Chao1". "Best", the default value, is currently "Jackknife". Ignored by richness interpolation, and by extrapolation if PCorrection is not "None".
Alpha
The risk level, 5% by default, used to optimize the jackknife order.
JackOver
If TRUE, retain the jackknife order immediately superior to the optimal one, usually resulting in the overestimation of the number of species. Default is FALSE.
JackMax
The highest jackknife order allowed. Default is 10. Allowed values are between 1 and 10.
Level
The level of interpolation or extrapolation. It may be an a chosen sample size (an integer) or a sample coverage (a number between 0 and 1). Richness extrapolation require its asymptotic estimation depending on the choice of Correction.
PCorrection
A string containing one of the possible corrections to estimate a probability distribution in as.ProbaVector: "Chao2015" is the default value. If "None", the asymptotic distribution is not estimated and extrapolation relies only on the asymptotic estimator of richness. 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" (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 entropy of the asymptotic distribution rarefied to the observed sample size equals the observed entropy of the data. Used only for extrapolation.
Additional arguments. Unused.
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
Bias correction requires the number of individuals. Use bcRichness and choose the Correction. Chao correction techniques are from Chao (1984) and Chiu et al. (2015). The Jackknife estimator is calculated by a straight adaptation of the code by Ji-Ping Wang (jackknife in CRAN-archived package SPECIES). The optimal order is selected according to Burnham and Overton (1978; 1979). The argument JackOver allows selecting one order over the optimal one. Many other estimators are available elsewhere, the ones implemented here are necessary for other entropy estimations. The functions are designed to be used as simply as possible. Richness is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcRichness is called. Richness can be estimated at a specified level of interpolation or extrapolation, either a chosen sample size or sample coverage (Chao et al., 2014), rather than its asymptotic value. Extrapolation relies on the estimation of the asymptotic richness. If PCorrection is "None", then the asymptotic estimation of richness is made using the chosen Correction, else the asymtpotic distribution of the community is derived and its estimated richness adjusted so that the entropy of a sample of this distribution of the size of the actual sample has the entropy of the actual sample.
Value
A named number equal to the estimated number of species. The name is the Correction, except for "SAC" (Species Accumulation Curve) for interpolation.
Examples
# 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)
References
Burnham, K. P., and Overton,W. S. (1978), Estimation of the Size of a Closed Population When Capture Probabilities Vary Among Animals. Biometrika, 65: 625-633. Burnham, K. P., and Overton,W. S. (1979), Robust Estimation of Population Size When Capture Probabilities Vary Among Animals. Ecology 60:927-936. Chao, A. (1984) Nonparametric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11: 265-270. 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. Chiu, C.-H., Wang, Y.-T., Walther, B. A., Chao, A. (2014) An Improved Nonparametric Lower Bound of Species Richness via a Modified Good-Turing Frequency Formula. Biometrics 70(3): 671-682.
Shannon
Shannon entropy of a community
CRAN · 1.6-16 · entropart/man/Shannon.Rd · 2026-05-07

Calculates the Shannon entropy of a probability vector.

Aliases
bcShannonShannonShannon.ProbaVectorShannon.AbdVectorShannon.integerShannon.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
Correction
A string containing one of the possible asymptotic estimators: "None" (no correction), "ChaoShen", "GenCov", "Grassberger", "Grassberger2003", "Schurmann", "Holste", "Bonachela", "Miller", "ZhangHz", "ChaoJost", "Marcon", "UnveilC", "UnveiliC", "UnveilJ" or "Best", the default value. Currently, "Best" is "UnveilJ".
Level
The level of interpolation or extrapolation. It may be an a chosen sample size (an integer) or a sample coverage (a number between 0 and 1). Entropy extrapolation require its asymptotic estimation depending on the choice of Correction. Entropy interpolation relies on the estimation of Abundance Frequence Counts: then, Correction is passed to AbdFreqCount as its Estimator argument.
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" (the unobserved species distribution is geometric) is the default value. If "None", the asymptotic distribution is not unveiled and only the asymptotic estimator is used. 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 entropy of the asymptotic distribution rarefied to the observed sample size equals the observed entropy of the data. Used only for extrapolation.
Additional arguments. Unused.
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
Bias correction requires the number of individuals to estimate sample Coverage. Correction techniques are from Miller (1955), Chao and Shen (2003), Grassberger (1988), Grassberger (2003), Schurmann (2003), Holste et al. (1998), Bonachela et al. (2008), Zhang (2012), Chao, Wang and Jost (2013). More estimators can be found in the entropy package. Using MetaCommunity mutual information, Chao, Wang and Jost (2013) calculate reduced-bias Shannon beta entropy (see the last example below) with better results than the Chao and Shen estimator, but community weights cannot be arbitrary: they must be proportional to the number of individuals. The functions are designed to be used as simply as possible. Shannon is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcShannon is called. Entropy can be estimated at a specified level of interpolation or extrapolation, either a chosen sample size or sample coverage (Chao et al., 2014), rather than its asymptotic value. Extrapolation relies on the estimation of the asymptotic entropy. If Unveiling is "None", then the asymptotic estimation of entropy is made using the chosen Correction, else the asymtpotic distribution of the community is derived and its estimated richness adjusted so that the entropy of a sample of this distribution of the size of the actual sample has the entropy of the actual sample.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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))
See also
bcShannon, Tsallis
References
Bonachela, J. A., Hinrichsen, H. and Munoz, M. A. (2008). Entropy estimates of small data sets. Journal of Physics A: Mathematical and Theoretical 41(202001): 1-9. Chao, A. and Shen, T. J. (2003). Nonparametric estimation of Shannon's index of diversity when there are unseen species in sample. Environmental and Ecological Statistics 10(4): 429-443. Chao, A., Wang, Y. T. and Jost, L. (2013). Entropy and the species accumulation curve: a novel entropy estimator via discovery rates of new species. Methods in Ecology and Evolution 4(11):1091-1100. 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. Grassberger, P. (1988). Finite sample corrections to entropy and dimension estimates. Physics Letters A 128(6-7): 369-373. Grassberger, P. (2003). Entropy Estimates from Insufficient Samplings. ArXiv Physics e-prints 0307138. Holste, D., Grosse, I. and Herzel, H. (1998). Bayes' estimators of generalized entropies. Journal of Physics A: Mathematical and General 31(11): 2551-2566. Miller, G. (1955) Note on the bias of information estimates. In: Quastler, H., editor. Information Theory in Psychology: Problems and Methods: 95-100. Shannon, C. E. (1948). A Mathematical Theory of Communication. The Bell System Technical Journal 27: 379-423, 623-656. Schurmann, T. (2004). Bias analysis in entropy estimation. Journal of Physics A: Mathematical and Theoretical 37(27): L295-L301. Tsallis, C. (1988). Possible generalization of Boltzmann-Gibbs statistics. Journal of Statistical Physics 52(1): 479-487. Zhang, Z. (2012). Entropy Estimation in Turing's Perspective. Neural Computation 24(5): 1368-1389.
ShannonBeta
Shannon beta entropy of a community
CRAN · 1.6-16 · entropart/man/ShannonBeta.Rd · 2026-05-07

Calculates the Shannon beta entropy of a community belonging to a metacommunity.

Aliases
ShannonBetabcShannonBetaShannonBeta.ProbaVectorShannonBeta.AbdVectorShannonBeta.integerShannonBeta.numeric
Usage
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)
Arguments
Ps
The probability vector of species of the community.
Pexp
The probability vector of species of the metacommunity.
Ns
A numeric vector containing species abundances of the community.
Nexp
A numeric vector containing species abundances of the metacommunity.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the community.
NorPexp
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the metacommunity.
Correction
A string containing one of the possible corrections: currently, "ChaoShen" (Marcon et al., 2012) equivalent to "Best", and "ZhangGrabchak" (Zhang and Grabchak, 2014).
Additional arguments. Unused.
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 derivation of Shannon beta entropy can be found in Marcon et al. (2012). Bias correction requires the number of individuals to estimate sample Coverage. Use bcShannonBeta and choose the Correction. The functions are designed to be used as simply as possible. ShannonBeta is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcShannonBeta is called. Explicit calls to bcShannonBeta (with bias correction) or to ShannonBeta.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A number equal to the calculated entropy.
Examples
# 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)
See also
bcShannonBeta
References
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. Zhang, Z. and Grabchak M. (2014). Nonparametric Estimation of Kullback-Leibler Divergence. Neural computation 26(11): 2570-2593.
SimTest
SimTest class
CRAN · 1.6-16 · entropart/man/SimTest.Rd · 2026-05-07

Methods for objects of type "SimTest", used to test a value against its distribution under a simulated null hypothesis.

Aliases
SimTestas.SimTestis.SimTestautoplot.SimTestplot.SimTestsummary.SimTest
Usage
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), )
Arguments
x
An object to be tested or plotted.
object
An object.
RealValue
A numeric Value (the actual one).
SimulatedValues
A numeric vector containing the simulated values.
Quantiles
A vector containing the quantiles of interest.
colValue
The color of the line representing the real value on the plot.
lwdValue
The width of the line representing the real value on the plot.
ltyValue
The line type of the line representing the real value on the plot.
colQuantiles
The color of the lines representing the quantiles on the plot.
lwdQuantiles
The width of the lines representing the quantiles on the plot.
ltyQuantiles
The line type of the lines representing the quantiles on the plot.
main
The main title of the plot. if NULL (by default), there is no title.
xlab
The X axis label.
ylab
The Y axis label.
Additional arguments to be passed to the generic methods.
Details
Simulated values should be obtained by simulation. The actual value is compared to simulated quantiles. SimTest objects can be plotted and summarized.
Value
SimTest objects are lists containing: RealValueThe value to test. SimulatedValuesA vector of simulated values, whose quantiles will be used for the test. is.SimTest returns TRUE if the object is of class SimTest. summary.SimTest returns a summary of the object, including the empirical quantile of the real value in the simulated distributon.
Examples
# 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)
Simpson
Simpson entropy of a community
CRAN · 1.6-16 · entropart/man/Simpson.Rd · 2026-05-07

Calculates the Simpson entropy of a probability vector.

Aliases
SimpsonbcSimpsonSimpson.ProbaVectorSimpson.AbdVectorSimpson.integerSimpson.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
Correction
A string containing one of the possible corrections accepted by bcTsallis or "Lande". "Best", the default value, is currently "Jackknife". Ignored by interpolation and extrapolation.
Level
The level of interpolation or extrapolation. It may be an a chosen sample size (an integer) or a sample coverage (a number between 0 and 1).
Additional arguments. Unused.
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
Lande's correction has been derived (Lande, 1996; Good, 1953) especially for Simpson entropy, while other corrections are for generalized Tsallis entropy. It is identical to the unbiased estimator proposed by Simpson, although arguments were different. It equals the plug-in etimator multiplied by n/(n-1) where n is the total number of individuals. Bias correction requires the number of individuals to estimate sample Coverage. The functions are designed to be used as simply as possible. Simpson is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcSimpson is called. Entropy can be estimated at a specified level of interpolation or extrapolation, either a chosen sample size or sample coverage (Chao et al., 2014), rather than its asymptotic value. Simpson's extrapolated entropy estimator does not rely on the estimation of the asymptotic distribution.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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)
See also
Tsallis, bcSimpson
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. Good, I. J. (1953). On the Population Frequency of Species and the Estimation of Population Parameters. Biometrika 40(3/4): 237-264. Lande, R. (1996). Statistics and partitioning of species diversity, and similarity among multiple communities. Oikos 76: 5-13. Simpson, E. H. (1949). Measurement of diversity. Nature 163(4148): 688.
SimpsonBeta
Simpson beta entropy of a community
CRAN · 1.6-16 · entropart/man/SimpsonBeta.Rd · 2026-05-07

Calculates the Simpson beta entropy of a community belonging to a metacommunity.

Aliases
SimpsonBetabcSimpsonBetaSimpsonBeta.ProbaVectorSimpsonBeta.AbdVectorSimpsonBeta.integerSimpsonBeta.numeric
Usage
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)
Arguments
Ps
The probability vector of species of the community.
Pexp
The probability vector of species of the metacommunity.
Ns
A numeric vector containing species abundances of the community.
Nexp
A numeric vector containing species abundances of the metacommunity.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the community.
NorPexp
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the metacommunity.
Correction
A string containing one of the possible corrections: currently, only "ChaoShen", identical to "Best".
Additional arguments. Unused.
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 derivation of Tsallis beta entropy (Simpson is Tsallis of order 2) can be found in Marcon et al. (2014). Bias correction requires the number of individuals to estimate sample Coverage. Use bcSimpsonBeta and choose the Correction. Note that Simpson beta entropy value is related to Simpson alpha entropy value and cannot be compared accross communities (Jost, 2007). Beta entropy of a community is not meaningful in general, do rather calculate the BetaDiversity of order 2 of the metacommunity. The functions are designed to be used as simply as possible. SimpsonBeta is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcSimpsonBeta is called. Explicit calls to bcSimpsonBeta (with bias correction) or to SimpsonBeta.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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)
See also
Simpson, bcSimpsonBeta, BetaDiversity
References
Jost (2007), Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439. Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289.
SpeciesDistribution
Species Distributions
CRAN · 1.6-16 · entropart/man/SpeciesDistribution.Rd · 2026-05-07

A Species Distribution is a (preferably named) vector containing species abundances or probabilities.

Aliases
SpeciesDistributionas.SpeciesDistributionas.SpeciesDistribution.data.frameas.SpeciesDistribution.integeras.SpeciesDistribution.numericis.SpeciesDistributionautoplot.SpeciesDistributionplot.SpeciesDistributionAbdVectoras.AbdVectoras.AbdVector.data.frameas.AbdVector.integeras.AbdVector.numericis.AbdVectorProbaVectoras.ProbaVectoras.ProbaVector.data.frameas.ProbaVector.integeras.ProbaVector.numericis.ProbaVector
Usage
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)
Arguments
x
An object.
object
An object.
Distribution
The distribution to fit on the plot. May be "lnorm" (log-normal), "lseries" (log-series), "geom" (geometric) or "bstick" (broken stick). If NULL, no distribution is fitted. See rCommunity for the description of these distributions.
Round
If TRUE (by default), values of x are set to integer to create an AbdVector. This is useful if original abundances are not integers (this is often the case for MetaCommunity abundances which are the product of probabilities by the number of individuals) and integer values are required (for example to calculate the bootstrap confidence interval of a community profile).
Correction
A string containing one of the possible corrections to estimate a probability distribution: "None" (no correction, the default value), or "Chao2013", "Chao2015", "ChaoShen" to estimate the probability of the observed species in the asymptotic distribution.
Unveiling
A string containing one of the possible unveiling methods to estimate the probabilities of the unobserved species: "None" (default, no species is added), "unif" (uniform: all unobserved species have the same probability) or "geom" (geometric: the unobserved species distribution is geometric).
RCorrection
A string containing a correction recognized by Richness to evaluate the total number of species. "Jackknife" is the default value. An alternative is "Rarefy" to estimate the number of species such that the entropy of order q of the asymptotic distribution rarefied to the observed sample size equals the actual entropy of the data.
JackOver
If TRUE, retain the jackknife order immediately superior to the optimal one, usually resulting in the overestimation of the number of species. Default is FALSE. Ignored if RCorrection is not "Jackknife".
JackMax
The highest jackknife order allowed. Default is 10. Allowed values are between 1 and 10.
CEstimator
A string containing an estimator recognized by Coverage to evaluate the sample coverage. "ZhangHuang" is the default value.
q
A number: the order of entropy. Default is 0 for richness. Used only to estimate asymptotic probability distributions with RCorrection equal to "Rarefy". Then, the number of unobserved species is fitted so that the entropy of order q of the asymptotic probability distribution at the observed sample size equals the actual entropy of the data.
type
The plot type, see plot.
log
The axis to plot in log scale, e.g. "xy" for both axes. Default is "y".
main
The main title of the plot. if NULL (by default), there is no title.
xlab
The X axis label, "Rank" by default.
ylab
The Y axis label. if NULL (by default), "Probability" or "Abundance" is chosen according to the object class.
ylog
Logical; if TRUE (by default), the Y-axis of the plot is log scaled.
pch
The plotting characters. See points.
col
The color of the geom objects. See "Color Specification" in par.
cex
The character expansion (size) of the points. See points.
Additional arguments to be passed to plot. Unused elsewhere.
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
SpeciesDistribution objects include AbdVector and ProbaVector objects. as.AbdVector just sets the class of the numeric or integer x so that appropriate versions of community functions (generic methods such as Diversity) are applied. Abundance values are rounded (by default) to the nearest integer. as.ProbaVector normalizes the vector so that it sums to 1. If Correction is not "None", the observed abundance distribution is used to estimate the actual species distribution. The list of species will be changed: zero-abundance species will be cleared, and some unobserved species will be added. First, observed species probabilities are estimated folllowing Chao and Shen (2003), i.e. input probabilities are multiplied by the sample coverage, or according to more sophisticated models: Chao et al. (2013, single-parameter model), or Chao et al. (2015, two-parameter model). The total probability of observed species equals the sample coverage. Then, the distribution of unobserved species can be unveiled: their number is estimated according to RCorrection (if the Jackknife estimator is chosen, the JackOver argument allows using the order immediately over the optimal one). The coverage deficit (1 minus the sample coverage) is shared by the unobserved species equally (Unveiling = "unif", Chao et al., 2013) or according to a geometric distribution (Unveiling = "geom", Chao et al., 2015). These functions can be applied to data frames to calculate the joint diversity (Gregorius, 2010). SpeciesDistribution objects can be plotted. The plot method returns the estimated parameters of the fitted distribution. The broken stick has no parameter, so the maximum abundance is returned.
Examples
# 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")
See also
rgeom, rlnorm, rCommunity, RAClnorm
Note
Fisher's alpha (Fisher et al., 1943) is estimated to fit the log-series distribution. The estimation is done by the [vegan]fisher.alpha function of package vegan. It may differ substantially from the estimation returned by optimal.theta from package untb.
Author
Eric Marcon <Eric.Marcon@agroparistech.fr>, Bruno Herault <Bruno.Herault@cirad.fr>
References
Chao, A. and Shen, T. J. (2003). Nonparametric estimation of Shannon's index of diversity when there are unseen species in sample. Environmental and Ecological Statistics 10(4): 429-443. Chao, A., Wang, Y. T. and Jost, L. (2013). Entropy and the species accumulation curve: a novel entropy estimator via discovery rates of new species. Methods in Ecology and Evolution 4(11):1091-1100. Chao, A., Hsieh, T. C., Chazdon, R. L., Colwell, R. K., Gotelli, N. J. (2015) Unveiling the Species-Rank Abundance Distribution by Generalizing Good-Turing Sample Coverage Theory. Ecology 96(5): 1189-1201. Fisher R.A., Corbet A.S., Williams C.B. (1943) The Relation Between the Number of Species and the Number of Individuals in a Random Sample of an Animal Population. Journal of Animal Ecology 12: 42-58. Gregorius H.-R. (2010) Linking Diversity and Differentiation. Diversity 2(3): 370-394.
Tsallis
Tsallis (HCDT) Entropy of a community
CRAN · 1.6-16 · entropart/man/Tsallis.Rd · 2026-05-07

Calculates the HCDT, also known as Tsallis entropy of order q of a probability vector.

Aliases
TsallisbcTsallisTsallis.ProbaVectorTsallis.AbdVectorTsallis.integerTsallis.numeric
Usage
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)
Arguments
Ps
A probability vector, summing to 1.
Ns
A numeric vector containing species abundances.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities.
q
A number: the order of entropy. Some corrections allow only a positive number. Default is 1 for Shannon entropy.
Correction
A string containing one of the possible asymptotic estimators: "None" (no correction), "ChaoShen", "GenCov", "Grassberger", "Holste", "Bonachela", "ZhangGrabchak", or "ChaoJost", "Marcon", "UnveilC", "UnveiliC", "UnveilJ" or "Best", the default value. Currently, "Best" is "UnveilJ".
Level
The level of interpolation or extrapolation. It may be an a chosen 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" (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 entropy of the asymptotic distribution rarefied to the observed sample size equals the observed entropy of the data. Used only for extrapolation.
SampleCoverage
The sample coverage of Ns calculated elsewhere. Used to calculate the gamma diversity of meta-communities, see details.
Additional arguments. Unused.
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
Tsallis (Havrda and Charvat, 1967; Daroczy, 1970; Tsallis, 1988) generalized entropy is a generalized measure of diversity (Jost, 2006). Bias correction requires the number of individuals to estimate sample Coverage. Correction techniques are from Chao and Shen (2003), Grassberger (1988), Holste et al. (1998), Bonachela et al. (2008), (Marcon et al., 2014), which is actually the max value of "ChaoShen" and "Grassberger", Zhang and Grabchak (2014), Chao and Jost (2015) and Marcon (2015). The "ChaoJost" (Chao, Wang and Jost, 2013 for q=1; Chao and Jost, 2015) estimator contains an unbiased part concerning observed species, equal to that of Zhang and Grabchak (2014), and a (biased) estimator of the remaining bias based on the estimation of the species-accumulation curve. It is very efficient but very slow if the number of individuals is more than a few hundreds. This estimator was named "ChaoWangJost" in previous versions of the package; its old name is still supported for backward compatibility. The unveiled estimators rely on Chao et al. (2015), completed by Marcon (2015). The actual probabilities of observed species are estimated and completed by a geometric distribution of the probabilities of unobserved species. The number of unobserved species is estimated by the Chao1 estimator ("UnveilC"), following Chao et al. (2015), or by the iChao1 ("UnveiliC") or the jacknife ("UnveilJ"). The "UnveilJ" correction often has a lower bias but a greater variance (Marcon, 2015). It is a good first choice thanks to the versatility of the jacknife estimator of richness. The functions are designed to be used as simply as possible. Tsallis is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcTsallis is called. The size of a metacommunity (see MetaCommunity) is unknown so it has to be set according to a rule which does not ensure that its abundances are integer values. Then, classical bias-correction methods do not apply. Providing the SampleCoverage argument allows applying the "ChaoShen" and "Grassberger" corrections to estimate quite well the entropy. DivPart and GammaEntropy functions use this tweak. Entropy can be estimated at a specified level of interpolation or extrapolation, either a chosen sample size or sample coverage (Chao et al., 2014), rather than its asymptotic value. Special cases $q$ equals 0, 1 or 2 are treated by Richness, Shannon and Simpson functions. For extrapolation of entropy of other values of $q$, the asymptotic distribution of the community must be estimated by as.ProbaVector. The default arguments allow joining smoothly the extrapolated entropy and the observed entropy by estimating the number of unobserved species so that the entropy of the observed distribution equals the entropy of the asymptotic distribution rarefied to the actual sample size.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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)
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. and Jost, L. (2015) Estimating diversity and entropy profiles via discovery rates of new species. Methods in Ecology and Evolution 6(8): 873-882. Chao, A., Hsieh, T. C., Chazdon, R. L., Colwell, R. K., Gotelli, N. J. (2015) Unveiling the Species-Rank Abundance Distribution by Generalizing Good-Turing Sample Coverage Theory. Ecology 96(5): 1189-1201. Chao, A., Wang, Y. T. and Jost, L. (2013). Entropy and the species accumulation curve: a novel entropy estimator via discovery rates of new species. Methods in Ecology and Evolution 4(11):1091-1100. Havrda, J. and Charvat, F. (1967). Quantification method of classification processes. Concept of structural a-entropy. Kybernetika 3(1): 30-35. Daroczy, Z. (1970). Generalized information functions. Information and Control 16(1): 36-51. Jost, L. (2006). Entropy and diversity. Oikos 113(2): 363-375. Marcon, E. (2015) Practical Estimation of Diversity from Abundance Data. HAL 01212435: 1-27. Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289. Tsallis, C. (1988). Possible generalization of Boltzmann-Gibbs statistics. Journal of Statistical Physics 52(1): 479-487. Zhang, Z., and Grabchak, M. (2016). Entropic Representation and Estimation of Diversity Indices. Journal of Nonparametric Statistics, 28(3): 563-575.
TsallisBeta
Tsallis beta entropy of a community
CRAN · 1.6-16 · entropart/man/TsallisBeta.Rd · 2026-05-07

Calculates the Tsallis beta entropy of order q of a community belonging to a metacommunity.

Aliases
TsallisBetabcTsallisBetaTsallisBeta.ProbaVectorTsallisBeta.AbdVectorTsallisBeta.integerTsallisBeta.numeric
Usage
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)
Arguments
Ps
The probability vector of species of the community.
Pexp
The probability vector of species of the metacommunity.
Ns
A numeric vector containing species abundances of the community.
Nexp
A numeric vector containing species abundances of the metacommunity.
NorP
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the community.
NorPexp
A numeric vector, an integer vector, an abundance vector (AbdVector) or a probability vector (ProbaVector). Contains either abundances or probabilities of the metacommunity.
q
A number: the order of entropy. Default is 1 for Shannon entropy.
Correction
A string containing one of the possible corrections: currently, only "ChaoShen" or "None". "Best" is the default value, it is equivalent to "ChaoShen".
Additional arguments. Unused.
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 derivation of Tsallis beta entropy can be found in Marcon et al. (2014). Bias correction requires the number of individuals to estimate sample Coverage. Use bcTsallisBeta and choose the Correction. Note that beta entropy value is related to alpha entropy (if q is not 1) and cannot be compared accross communities (Jost, 2007). Beta entropy of a community is not meaningful in general, do rather calculate the BetaDiversity of the metacommunity. The functions are designed to be used as simply as possible. TsallisBeta is a generic method. If its first argument is an abundance vector, an integer vector or a numeric vector which does not sum to 1, the bias corrected function bcTsallisBeta is called. Explicit calls to bcTsallisBeta (with bias correction) or to TsallisBeta.ProbaVector (without correction) are possible to avoid ambiguity. The .integer and .numeric methods accept Ps or Ns arguments instead of NorP for backward compatibility.
Value
A named number equal to the calculated entropy. The name is that of the bias correction used.
Examples
# 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)
References
Jost (2007), Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439. Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289.
entropart-package
Entropy Partitioning to Measure Diversity
CRAN · 1.6-16 · package · entropart/man/entropart-package.Rd · 2026-05-07

Functions to calculate alpha, beta and gamma diversity of communities, including phylogenetic and functional diversity. Estimation-bias corrections are available.

Aliases
entropart-packageentropart
Keywords
package
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
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).
expq
Exponential of order q
CRAN · 1.6-16 · entropart/man/expq.Rd · 2026-05-07

Calculates the deformed exponential of order q.

Aliases
expqexpq.CommunityProfile
Usage
expq(x, q) expq.CommunityProfile(Profile)
Arguments
x
A numeric vector.
Profile
A CommunityProfile.
q
A number.
Details
The deformed exponential is defined as (x(1-q)+1)^1(1-q). For q>1, _q(+)=1(q-1) so _q(x) is not defined for x>1(q-1). expq.CommunityProfile calculates the deformed exponential of a CommunityProfile. Its $x item (the order of diversity) is kept unchanged whilst other items are set to their exponential of order $x. Thus, an entropy profile is transformed into a diversity profile.
Value
A vector of the same length as x containing the transformed values or a CommunityProfile.
Examples
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)
See also
expq
References
Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang, G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289. Tsallis, C. (1994). What are the numbers that experiments provide? Quimica Nova 17(6): 468-471.
lnq
Logarithm of order q
CRAN · 1.6-16 · entropart/man/lnq.Rd · 2026-05-07

Calculates the deformed logarithm of order q.

Aliases
lnqlnq.CommunityProfile
Usage
lnq(x, q) lnq.CommunityProfile(Profile)
Arguments
x
A numeric vector.
Profile
A CommunityProfile.
q
A number.
Details
The deformed logarithm is defined as _qx=(x^(1-q)-1)(1-q). The shape of the deformed logarithm is similar to that of the regular one. _1x=x. For q>1, _q(+)=1(q-1). lnq.CommunityProfile calculates the deformed logarithm of a CommunityProfile. Its $x item (the order of diversity) is kept unchanged whilst other items are set to their logarithm of order $x. Thus, a diversity profile is transformed into an entropy profile.
Value
A vector of the same length as x containing the transformed values or a CommunityProfile.
Examples
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)
See also
expq
References
Tsallis, C. (1994). What are the numbers that experiments provide? Quimica Nova 17(6): 468-471.
mergeandlabel
Merge community data
CRAN · 1.6-16 · entropart/man/mergeandlabel.Rd · 2026-05-07

Merge two dataframes containing species abundances.

Aliases
mergeandlabel
Keywords
internal
Usage
mergeandlabel(x, y)
Arguments
x
A dataframe containing species abundances
y
A dataframe containing species abundances
Details
Row names must contain species. The new dataframe keeps all species with abundance zero for species that were not found in original communities.
Value
A dataframe containing all lines and columns of the merged dataframes.
See also
MergeC, MergeMC, ShuffleMC
rCommunity
Random Communities
CRAN · 1.6-16 · entropart/man/rCommunity.Rd · 2026-05-07

Draws random communities according to a probability distribution.

Aliases
rCommunity
Usage
rCommunity(n, size = sum(NorP), NorP = 1, BootstrapMethod = "Chao2015", S = 300, Distribution = "lnorm", sd = 1, prob = 0.1, alpha = 40, CheckArguments = TRUE)
Arguments
n
The number of communities to draw.
size
The number of individuals to draw in each community.
BootstrapMethod
The method used to obtain the probabilities to generate bootstrapped communities from observed abundances. If "Marcon", the probabilities are simply the abundances divided by the total number of individuals (Marcon et al., 2012). If "Chao2013" or "Chao2015" (by default), a more sophisticated approach is used (see as.ProbaVector) following Chao et al. (2013) or Chao et al. (2015).
NorP
A numeric vector. Contains either abundances or probabilities.
S
The number of species.
Distribution
The distribution of species frequencies. May be "lnorm" (log-normal), "lseries" (log-series), "geom" (geometric) or "bstick" (broken stick).
sd
The simulated distribution standard deviation. For the log-normal distribution, this is the standard deviation on the log scale.
prob
The proportion of ressources taken by successive species.
alpha
Fisher's alpha.
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
Communities of fixed size are drawn in a multinomial distribution according to the distribution of probabilities provided by NorP. An abundance vector may be used instead of probabilities, then size is by default the total number of individuals in the vector. Random communities are built by drawing in a multinomial law following Marcon et al. (2012), or trying to estimate the distribution of the actual community with as.ProbaVector. If BootstrapMethod = "Chao2013", the distribution is estimated by a single parameter model and unobserved species are given equal probabilities. If BootstrapMethod = "Chao2015", a two-parameter model is used and unobserved species follow a geometric distribution. Alternatively, the probabilities may be drawn following a classical distribution: either a lognormal ("lnorm") one (Preston, 1948) with given standard deviation (sd; note that the mean is actually a normalizing constant. Its values is set equal to 0 for the simulation of the normal distribution of unnormalized log-abundances), a log-series ("lseries") one (Fisher et al., 1943) with parameter alpha, a geometric ("geom") one (Motomura, 1932) with parameter prob, or a broken stick ("bstick") one (MacArthur, 1957). The number of simulated species is fixed by S, except for "lseries" where it is obtained from alpha and size: S= (1 + size). Log-normal, log-series and broken-stick distributions are stochastic. The geometric distribution is completely determined by its parameters.
Value
A vector of species abundances (AbdVector) if a single community has been drawn, or a MetaCommunity containing simulated communities.
Examples
# 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)
See also
SpeciesDistribution and the program SimAssem (Reese et al., 2013; not an R package) for more distributions.
References
Chao, A., Wang, Y. T. and Jost, L. (2013). Entropy and the species accumulation curve: a novel entropy estimator via discovery rates of new species. Methods in Ecology and Evolution 4(11): 1091-1100. Chao, A., Hsieh, T. C., Chazdon, R. L., Colwell, R. K., Gotelli, N. J. (2015) Unveiling the Species-Rank Abundance Distribution by Generalizing Good-Turing Sample Coverage Theory. Ecology 96(5): 1189-1201. Fisher R.A., Corbet A.S., Williams C.B. (1943) The Relation Between the Number of Species and the Number of Individuals in a Random Sample of an Animal Population. Journal of Animal Ecology 12: 42-58. MacArthur R.H. (1957) On the Relative Abundance of Bird Species. PNAS 43(3): 293-295. 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. Motomura I. (1932) On the statistical treatment of communities. Zoological Magazine 44: 379-383. Preston, F.W. (1948). The commonness, and rarity, of species. Ecology 29(3): 254-283. Reese G. C., Wilson K. R., Flather C. H. (2013) Program SimAssem: Software for simulating species assemblages and estimating species richness. Methods in Ecology and Evolution 4: 891-896.
reexports
Objects exported from other packages
CRAN · 1.6-16 · import · entropart/man/reexports.Rd · 2026-05-07

These objects are imported from other packages. Follow the links below to see their documentation. ggplot2[ggplot2]autoplot graphics[graphics:plot.default]plot

Aliases
reexportsautoplotplot
Keywords
internal

버전 이력

RepositoryVersionPublishedFirst seenLast seenDocs
CRAN1.6-162026-05-292026-05-30

보안

표시할 OSV 데이터가 없습니다.

문헌 신호

표시할 OpenAlex 데이터가 없습니다.