gammaAccum: Perform gamma diversity accumulation on divtable or...

Description Usage Arguments Note References See Also Examples

View source: R/gammaAccum-divtable.R

Description

Perform a gamma diversity accumulation on site-by-source data in tab, an object of class divtable, or a set of site-by-alleles count data for several loci, an object of classs allele_divtables. Several arguments control the method of accumulation and value of gamma calculated. Only the defaults have been tested; the others were developed while exploring the data and must be considered experimental. The result is returned in a list, which may be passed to plotGammaAccum to plot the result.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'divtable'
gammaAccum(tab, resample.method = c("permute",
  "bootstrap"), n.resample = 1000, gamma.method = c("q", "r", "q.nielsen"),
  ...)

## S3 method for class 'allele_divtables'
gammaAccum(adt, resample.method = c("permute",
  "bootstrap"), n.resample = 1000, gamma.method = c("q", "r", "q.nielsen"),
  ...)

Arguments

tab

Site-by-source table of class divtable

resample.method

"permute" (default) or "bootstrap". Whether to resample sites without replacement ("permute") or with replacement ("bootstrap").

n.resample

Number of resamples for accumulation curve

gamma.method

Calculate gamma using "q" (default for class divtable), "r" (default for class allele_divtables) or "q.nielsen" method

adt

Allele diversity dataset of class allele_divtables

...

Additional parameters, currently unused

Note

Only the defaults have been tested; other options were developed while exploring the data and must be considered experimental.

References

Scofield, D. G., Smouse, P. E., Karubian, J. and Sork, V. L. (2012) Use of alpha, beta and gamma diversity measures to characterize seed dispersal by animals. American Naturalist 180:719-732.

Sork, V. L., Smouse, P. E., Grivet, D. and Scofield, D. G. (In press) Impact of asymmetric male and female gamete dispersal on allelic diversity and spatial genetic structure in valley oak (Quercus lobata N\'ee). Evolutionary Ecology.

See Also

plot.gamma_accum, gammaAccumSimple

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## generate random divtable
n.sites <- 5
n.sources <- 10
n.samples <- 160
set.seed(75333)
t <- data.frame(site = sample(n.sites, n.samples, replace = TRUE),
                source = round(runif(n.samples) * n.sources + 0.5))
tab <- as.divtable(table(t))
## generate gamma accumulation results
rga.result = gammaAccum(tab)

## generate random allele_divtables
##
##

douglasgscofield/dispersalDiversity documentation built on March 30, 2021, 9:50 a.m.