Package: tidydiversity 0.3.0

tidydiversity: Taxonomic, Phylogenetic and Functional Diversity with Tidy Hill Numbers

Tidy, pipe-friendly tools for estimating taxonomic, phylogenetic and functional diversity from long-format community data. All three dimensions are expressed as Hill numbers of the same order q (effective numbers of species), following Chao, Chiu and Jost (2014) <doi:10.1146/annurev-ecolsys-120213-091540> and Chao et al. (2019) <doi:10.1002/ecm.1343>. Computes observed and asymptotic diversity, sample coverage, and size- and coverage-based rarefaction and extrapolation following Chao et al. (2014) <doi:10.1890/13-0133.1>, and partitions beta diversity into turnover and nestedness components following Baselga (2010) <doi:10.1111/j.1466-8238.2009.00490.x>. Every function takes a data frame and returns a tibble, uses data-masking for column arguments, and supports grouped data and the '.by' argument.

Authors:Jimmy Moses [aut, cre, cph]

tidydiversity_0.3.0.tar.gz
tidydiversity_0.3.0.zip(r-4.7-x86_64)tidydiversity_0.3.0.zip(r-4.7-arm64)tidydiversity_0.3.0.zip(r-4.6-x86_64)tidydiversity_0.3.0.zip(r-4.6-arm64)tidydiversity_0.3.0.zip(r-4.5-x86_64)
tidydiversity_0.3.0.tgz(r-4.6-x86_64)tidydiversity_0.3.0.tgz(r-4.6-arm64)tidydiversity_0.3.0.tgz(r-4.5-x86_64)tidydiversity_0.3.0.tgz(r-4.5-arm64)
tidydiversity_0.3.0.tar.gz(r-4.7-arm64)tidydiversity_0.3.0.tar.gz(r-4.7-x86_64)tidydiversity_0.3.0.tar.gz(r-4.6-arm64)tidydiversity_0.3.0.tar.gz(r-4.6-x86_64)
tidydiversity_0.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tidydiversity/json (API)

# Install 'tidydiversity' in R:
install.packages('tidydiversity', repos = c('https://jmozez.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jmozez/tidydiversity/issues

Pkgdown/docs site:https://tidydiversity.in4metrix.dev

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • png_ants - Ants at nutrient baits along Mt Wilhelm, Papua New Guinea
  • png_frogs - Frogs along the Mt Wilhelm elevational gradient, Papua New Guinea
  • png_tree_ants - Tree-nesting ants in rainforest plots at three elevations, Papua New Guinea
  • portal_rodents - Rodent captures at the Portal Project, Arizona
  • wanang_butterflies - Butterflies in the Wanang forest dynamics plot, Papua New Guinea
  • wanang_caterpillars - Caterpillars reared from trees in primary and secondary forest at Wanang

On CRAN:

Conda:

beta-diversitybiodiversitycommunity-ecologyconservationdiversity-estimationecologyfunctional-diversityhill-numberspapua-new-guineaphylogenetic-diversityrarefactionsample-coveragespecies-richnessstatisticstidyversecpp

3.78 score 88 exports 16 dependencies

Last updated from:908db33288. Checks:1 ERROR, 14 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64ERROR251
linux-devel-x86_64OK255
source / vignettesOK501
linux-release-arm64OK255
linux-release-x86_64OK219
macos-release-arm64OK238
macos-release-x86_64OK418
macos-oldrel-arm64OK205
macos-oldrel-x86_64OK432
windows-devel-arm64OK323
windows-devel-x86_64OK240
windows-release-arm64OK337
windows-release-x86_64OK204
windows-oldrel-x86_64OK185
wasm-releaseOK174

Exports:add_site_dataas_communitybeta_chaobeta_decaybeta_decay_bootbeta_decay_modelbeta_dispersionbeta_distbeta_hillbeta_hill_pairbeta_indicatorbeta_mantelbeta_multibeta_pairbeta_permanovabeta_sharedbeta_turnover_countsbeta_welchcommunity_longcommunity_widedata_aravodiv_bootdiv_completenessdiv_coveragediv_effortdiv_estimatediv_evennessdiv_fisher_alphadiv_hilldiv_homogenisationdiv_invasiondiv_rarefydiv_richnessdiv_standardisediv_tableglancemodel_case_weightsmodel_countmodel_group_foldsord_adviseord_fitord_interpretord_prcord_selectord_styleord_testord_varpartphylo_combine_distphylo_distphylo_signalplot_paletteplot_panelplot_partialplot_phyloplot_saveplot_surfaceplot_trait_spaceplot_vennrange_edgesrange_mderange_partitionrange_shift_expectedrange_shift_resurveyrange_shift_testrange_shift_validaterange_throughscale_colour_tidydiversityscale_fill_tidydiversitystems_abundancestems_as_communitystems_as_treesstems_basal_areastems_demographystems_size_classstep_hilltheme_tidydiversitytidytidyvisortrait_cwmtrait_cwm_testtrait_disttrait_fd_indicestrait_fourth_cornertrait_itvtrait_raotrait_sestrait_tpdtrait_tpd_dissim

Dependencies:clidplyrgenericsgluelifecyclemagrittrpillarpkgconfigR6Rcpprlangtibbletidyselectutf8vctrswithr

An elevational-gradient workflow
The design decides the statistics | 1. Richness along the gradient | 2. Diversity at equal coverage | 3. Composition: ordination with environmental vectors | 4. Does composition change with elevation? PERMANOVA | 5. Distance decay: the Mantel test | 6. Turnover or nestedness? Adjacent sites | 7. Comparing transects: distance-decay slopes | References

Last update: 2026-11-12
Started: 2026-11-12

Alpha diversity and rarefaction
The concept | Hill numbers | Sample coverage | Asymptotic estimates | Classic estimators (EstimateS and SpadeR) | How much more sampling is needed? | Rarefaction and extrapolation | Fair comparisons | How to report it | References

Last update: 2026-11-12
Started: 2026-11-03

Partitioning beta diversity
The concept | Pairwise dissimilarity | Many sites at once | Distance decay | Shared species and similarity corrected for unseen species | Hill-number dissimilarity between pairs of sites | Beta diversity at equal sample coverage | How to report it | References

Last update: 2026-11-12
Started: 2026-11-03

Getting started with tidydiversity
The example data | Tidy the community | Grouping | What next

Last update: 2026-11-07
Started: 2026-11-03

Readme and manuals

Help Manual

Help pageTopics
Tidy community dataas_community community_long community_wide
Plot tidydiversity resultsautoplot-tidydiversity autoplot.td_beta_decay autoplot.td_beta_hill autoplot.td_beta_hill_pair autoplot.td_beta_multi autoplot.td_beta_pair autoplot.td_completeness autoplot.td_coverage autoplot.td_dispersion autoplot.td_estimate autoplot.td_evenness autoplot.td_hill autoplot.td_mde autoplot.td_rarefy autoplot.td_standardise
Plot an ordinationautoplot.td_ordination
Distance decay of similaritybeta_decay
Bootstrap confidence interval for a distance-decay slopebeta_decay_boot
Fit and test a distance-decay modelbeta_decay_model
Pairwise dissimilarity as a distance matrixbeta_dist
Coverage-standardised beta diversity with Hill numbersbeta_hill
Pairwise Hill-number dissimilaritybeta_hill_pair
Indicator species analysisbeta_indicator
Mantel and partial Mantel testsbeta_mantel
Partition beta diversity into turnover and nestednessbeta_multi beta_pair
PERMANOVA and dispersion tests on community compositionbeta_dispersion beta_permanova
Shared species and similarity corrected for unseen speciesbeta_chao beta_shared
Shared, lost and gained species between pairs of sitesbeta_turnover_counts
Welch-type PERMANOVA robust to unequal dispersionbeta_welch
Alpine plant communities with traits (aravo) in long formatdata_aravo
Bootstrap replicates of diversity estimatesdiv_boot
Sample completeness profilesdiv_completeness
Sample coveragediv_coverage
Additional sampling effort neededdiv_effort
Asymptotic diversity estimatesdiv_estimate
Evenness profilesdiv_evenness
Fisher's alphadiv_fisher_alpha
Observed Hill numbersdiv_hill
Biotic homogenisation between two surveysdiv_homogenisation
Native and alien species in communitiesdiv_invasion
Rarefaction and extrapolation curvesdiv_rarefy
Classic species richness estimatorsdiv_richness
Standardise diversity by coverage or sample sizediv_standardise
Publication-ready tablesdiv_table
Precision weights from estimated diversitymodel_case_weights
Overdispersed count and proportion models (aods3-free)glance.td_count_model model_count tidy.td_count_model
Grouped cross-validation folds for community datamodel_group_folds
Which ordination and which test? Advice from the data and the questionord_advise
Ordination of community dataord_fit
Explain and interpret an ordination, its tests and its diagramord_interpret ord_interpret.td_ordination ord_interpret.td_prc ord_interpret.td_varpart
Principal response curvesautoplot.td_prc ord_prc
Forward selection of explanatory variablesord_select
Style of ordination diagramsord_style
Permutation tests for constrained ordinationsord_test
Variation partitioningautoplot.td_varpart ord_varpart
Combine functional and phylogenetic distancesphylo_combine_dist
Phylogenetic distances between speciesphylo_dist
Phylogenetic signal of traitsphylo_signal
Combine plots into a publication figureplot_panel
Plot a phylogeny with species abundances and phylogenetic diversityplot_phylo
Save a figure at journal sizesplot_save
Plot functional trait spaceplot_trait_space
Venn diagram of species shared between groupsplot_venn
Partial-effect and two-predictor surface plots (visreg / plotmo style)plot-partial plot_partial plot_surface
Ants at nutrient baits along Mt Wilhelm, Papua New Guineapng_ants
Frogs along the Mt Wilhelm elevational gradient, Papua New Guineapng_frogs
Tree-nesting ants in rainforest plots at three elevations, Papua New Guineapng_tree_ants
Rodent captures at the Portal Project, Arizonaportal_rodents
Elevational (or other gradient) ranges of speciesrange_edges
Mid-domain null model of richness along a gradientglance.td_mde range_mde
Geometry or environment? Partitioning richness along a gradientrange_partition
Range shifts between two surveys of the same gradientrange_shift_resurvey range_shift_test
Validate projected range shifts against resurveys (hindcasting)range_shift_expected range_shift_validate
Range-through interpolation along a gradientrange_through
ForestGEO-style stem and tree census verbsstems stems_abundance stems_as_community stems_as_trees stems_basal_area stems_demography stems_size_class
Hill number features in a recipestep_hill
Publication theme and colour palettesplot_palette scale_colour_tidydiversity scale_fill_tidydiversity theme_tidydiversity
Tidy and model-ready outputadd_site_data glance.td_coverage tidy-tidydiversity tidy.td_beta_pair tidy.td_boot tidy.td_estimate tidy.td_rarefy tidy.td_standardise
Tidy and glance methods for ordinationsglance.td_ordination tidy.td_ordination
tidyvisor: advice before the analysis, interpretation after ittidyvisor
Community-weighted mean traitstrait_cwm
Test CWM-environment relationships with the max testtrait_cwm_test
Trait dissimilarity between speciestrait_dist
Classic functional diversity indicestrait_fd_indices
Fourth-corner analysistrait_fourth_corner
Intra- and interspecific trait variabilitytrait_itv
Rao's quadratic entropy: alpha, beta and gamma functional diversitytrait_rao
Standardised effect sizes from null modelstrait_ses
Functional diversity from trait probability densitiestrait_tpd trait_tpd_dissim
Butterflies in the Wanang forest dynamics plot, Papua New Guineawanang_butterflies
Caterpillars reared from trees in primary and secondary forest at Wanangwanang_caterpillars