knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", message = FALSE ) library(tidyverse) library(diversity.tool)
The goal of diversity.tool is to ...
You can install the development version from GitHub with:
# install.packages("pak") pak::pkg_install("PaulESantos/diversity.tool")
This is a basic example which shows you how to solve a common problem:
library(diversity.tool) library(vegan) data("dune") dune_tbl <- dune |> comm_to_tbl() dune_tbl
dune_comm <- dune_tbl |> tbl_to_comm(site, species, abundance) dune_comm[1:6, 1:6]
data("bci") bci |> ivi_index(sub_plot, species, area_basal)
Rank-abundance calculation:
All sample units as one community
dune |> rankabund()
dune |> rankabund(group = "site")
+Rank-abundance plot
dune |> rankabund_plot()
dist
matrix to tibble:dune_dist <- vegdist(dune[1:10, 1:10]) dune_dist dune_dist_tbl <- diversity.tool::as_distbl(dune_dist) dune_dist_tbl
dune_dist_tbl |> long_distbl()
To cite the ppendemic package, please use:
citation("diversity.tool")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.