
H(abundances, lev = "alpha", wts = FALSE, q = 1, HCDT = FALSE, gini = FALSE, boot = FALSE, boot.arg = list(s.sizes = NULL, num.iter = 100))
Determining how to set community weights depends on the types of comparisons about communities that a researcher wants to make. For instance, Jost (2007) suggests that if species frequencies, but not the actual sizes of the communities are the topic of interest then communities should all be weighed equally. In contrast, community weights are usually unequal when the sizes of the communities has a large influence on the comparisons being made. For instance, when comparing the alpha and beta diversities of a landscape, using unequal community weights makes more sense.
Jost, L. 2007. Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439.
Hill, M. 1973. Diversity and evenness: A unifying notation and its consequences. Ecology 54: 427-432.
d
bootstrap
data(simesants)
H(simesants[,-1]) #remove column with site names; calculates alpha diversity of entire data-set
hemlock<-subset(simesants,Habitat=="Hemlock")
H(hemlock[-1])#alpha diversity of just hemlock site
H(simesants[,-1],lev="gamma", q=0)#species richness for entire data set
H(simesants[,-1],q=2,boot=TRUE)
H(simesants[,-1],q=2,boot=TRUE,boot.arg=list(num.iter=1000))
simesants_freq<-normalize.rows(simesants[,-1])#not a necessary step, but just to show what you would do if your data were in the form of frequencies, not counts
H(simesants_freq,q=2,boot=TRUE,boot.arg=list(s.sizes=c(198,186,102,108,187)))
Run the code above in your browser using DataLab