knitr::opts_chunk$set( collapse = TRUE, comment = "##", fig.path = "man/figures/README-", out.width = "100%" )
This package contains R functions to calculate taxonomic, functional, and phylogenetic diversity and site similarity through Hill Numbers. The underlying methods are based on Chao, Chiu and Jost 2014 and Chiu & Chao 2014.
To install this package, run the following code:
install.packages("hillR") # or install from Github install.packages("hillR", repos = c('https://daijiang.r-universe.dev', 'https://cloud.r-project.org'))
dummy = FD::dummy comm = dummy$abun traits = dummy$trait set.seed(123) tree = ape::rtree(n = ncol(comm), tip.label = paste0("sp", 1:ncol(comm))) library(hillR)
hill_taxa(comm, q = 0) # taxonomic alpha diversity hill_func(comm, traits, q = 0) # functional alpha diversity hill_phylo(comm, tree, q = 0) # phylogenetic alpha diversity
hill_taxa_parti(comm, q = 0) # taxonomic diversity across all sites hill_func_parti(comm, traits, q = 0) # functional diversity across all sites hill_phylo_parti(comm, tree, q = 0) # phylogenetic diversity across all sites
# pairwise taxonomic diversity hill_taxa_parti_pairwise(comm, q = 0, show_warning = FALSE, .progress = FALSE) # pairwise functional diversity hill_func_parti_pairwise(comm, traits, q = 0, show_warning = FALSE, .progress = FALSE) # pairwise phylogenetic diversity hill_phylo_parti_pairwise(comm, tree, q = 0, show_warning = FALSE, .progress = FALSE)
Licensed under the MIT license. (More information here.)
Please cite this package if you use it. The citation information can be obtained by running citation('hillR')
in R.
Li, (2018). hillR: taxonomic, functional, and phylogenetic diversity and similarity through Hill Numbers. Journal of Open Source Software, 3(31), 1041. https://doi.org/10.21105/joss.01041
@Article{, title = {hillR: taxonomic, functional, and phylogenetic diversity and similarity through Hill Numbers}, author = {Daijiang Li}, journal = {Journal of Open Source Software}, year = {2018}, volume = {3}, number = {31}, pages = {1041}, url = {https://doi.org/10.21105/joss.01041}, }
Contributions are welcome. You can provide comments and feedback or ask questions by filing an issue on Github here or making pull requests.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.