Learn R Programming

fossil (version 0.4.0)

bootstrap: Bootstrap Species Richness Estimator

Description

Computes the bootstrap species richness estimator for abundance or presence-absence data

Usage

bootstrap(x, taxa.row = TRUE, abund = TRUE, samples = NA)

Arguments

x

a vector, matrix or data frame of positive integers or zero of any size

taxa.row

whether each row of the matrix is a different taxon

abund

whether the input is abundance (or presence/absence) based

samples

if input is a vector file, the number of samples must be included

Value

Returns a single value for the Bootstrap Species Estimator

Details

The bootstrap estimator

References

Smith, E.P. & van Belle, G. 1984. Nonparametric estimation of species richness. Biometrics 40, 119-129.

See Also

jack1, ACE, chao1

Examples

Run this code
# NOT RUN {
## sample vector
a<-c(0,5,1,1,2,0,0,1,0,0,8,45)
bootstrap(a,samples=45)

## matrix format
a<-matrix(c(0,5,1,1,2,0,0,1,0,0,8,45),4,3)
bootstrap(a)
bootstrap(a,,FALSE)


## presence absence matrix
a<-matrix(c(0,1,1,1,1,0,0,1,0,0,1,1),4,3)
bootstrap(a,,FALSE)
# }

Run the code above in your browser using DataLab