knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The untb
package provides R-centric functionality for working with
Hubbell's unified neutral theory of biogeography and biodiversity. A
vignette is provided in the package. The canonical reference is
Hubbell 2001; to cite the package in publications please use Hankin
2007.
You can install the released version of the untb
package from
CRAN with:
# install.packages("untb") # uncomment this to install the package library("untb") set.seed(0)
untb
package in useThe package has two main classes, count
and census
. A count
object is a named integer vector, with names being species and entries
being respective counts. Thus:
x <- count(c(cats=9,pigs=3,dogs=2,rats=1,hogs=1,bats=1)) x summary(x)
Above, we see 9 cats, 3 pigs, and so on. Function summary()
gives
further information. A census
object is an unordered factor with
entries being the species of each individual:
as.census(x)
The package includes example datasets:
data(sahfos) summary(sahfos)
We can give a visual summary of a dataset in two ways:
plot(sahfos) plot(preston(sahfos))
The package also includes the ability to generate random neutral assemblages:
summary(rand.neutral(1000,10)) summary(rand.neutral(1000,10))
S. P. Hubbell 2001. "The Unified Neutral Theory of Biodiversity and Biogeography", Princeton University Press.
R. K. S. Hankin, 2007. "Introducing untb, an R package for simulating ecological drift under the unified nuetral theory of biodiversity", Journal of Statistical Software 22(12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.