Learn R Programming

parfossil (version 0.2.0)

par.spp.est: A parallelized function for estimating species diversity

Description

Estimate the diversity of a sample(s) using a number of species diversity estimators.

Usage

par.spp.est(x, rand = 10, abund = TRUE, counter = FALSE)

Arguments

x
A vector, matrix or data frame with species as rows and locations/samples as columns
rand
The number of times to run the internal randomizations; default is set to 10
abund
If the data is abundance or presence/absence; default is set to TRUE for abundance
counter
Whether or not to provide a running total of progress of randomizations

Value

Returns a table with the following column names if abund=TRUE:
N.obs
Total sample size
S.obs
Number of observed species
S.obs(+95%)
95% upper confidence interval
S.obs(-95%)
95% lower confidence interval
Chao1
Chao Species Estimation
Chao1(upper)
95% upper confidence interval
Chao1(lower)
95% lower confidence interval
ACE
Abundance-based Coverage Estimator
ACE(upper)
95% upper confidence interval
ACE(lower)
95% lower confidence interval
Jack1
First Order Jacknife Estimator
Jack1(upper)
95% upper confidence interval
Jack1(lower)
95% lower confidence interval
Returns a table with the following column names if abund=FALSE:
N.obs
Total sample size
S.obs
Number of observed species
S.obs(+95%)
95% upper confidence interval
S.obs(-95%)
95% lower confidence interval
Chao2
Chao Species Estimation
Chao2(upper)
95% upper confidence interval
Chao2(lower)
95% lower confidence interval
ICE
Incidence-based Coverage Estimator
ICE(upper)
95% upper confidence interval
ICE(lower)
95% lower confidence interval
Jack1
First Order Jacknife Estimator
Jack1(upper)
95% upper confidence interval
Jack1(lower)
95% lower confidence interval

Details

This function will accept a vector, matrix or data frame of species by samples and return a large matrix with various species estimation values.

References

The original idea for a program similar to this came from the extremely useful EstimateS program by Robert K. Colwell

Colwell, R.K. 2010. EstimateS: Statistical estimation of species richness and shared species from samples. Version 8.2. User's Guide and application published at: http://purl.oclc.org/estimates.

See Also

chao1, jack1, bootstrap

Examples

Run this code
## Not run: 
# #comparison of run times between the serial and parallel versions on the estimator
# #please note that this example is designed for a multicore OS X or Linux computer
# library(doMC)
# registerDoMC()
# data(fdata.mat)
# system.time({spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
# system.time({par.spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
# 
# #this example is for a multicore Windows computer, but HAS NOT BEEN TESTED
# library(doSNOW)
# library(snow)
# cl <- makeCluster(c("localhost","localhost"), type = "SOCK")
# registerDoSNOW(c1)
# data(fdata.mat)
# system.time({spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
# system.time({par.spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
# stopCluster(cl)
# 
# ## End(Not run)

Run the code above in your browser using DataLab