Description Usage Arguments Value Author(s) References Examples
Set of functions for estimating species niche breadth based on compositional data using co-occurrence based theta metric introduced by Fridley et al. (2007).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | calculate.theta(input.matrix, species.data = NULL, thresh = 5,
psample = 5, reps = 10, method = "multiplicative", q = 0,
rarefaction = TRUE, beta.div.method = "hellinger",
beta.div.sqrt.D = FALSE, beta.div.samp = TRUE, beals.file = NULL,
pa.transform = FALSE, force.subsample = FALSE, parallel = FALSE,
no.cores = 2, remove.out = F, out.metric = "sorensen", verbal = F,
juicer = F, tcltk = F)
calculate.theta.0(temp.matrix, sci.name, sp, remove.out, out.metric, thresh,
psample, reps, method, rarefaction, q, beta.div.method, beta.div.sqrt.D,
beta.div.samp, force.subsample, parallel, win.pb, verbal, juicer)
calculate.theta.tcltk(input.matrix, species.data = NULL, juicer = T)
beals.2(x, include = TRUE, verbal = FALSE)
|
input.matrix |
Community data ( |
species.data |
Species data ( |
thresh |
Minimal frequency of species. Habitat specialization will be calculated for species occurring in number of samples equal or higher than minimal frequency threshold. Default = |
psample |
Size of one random subsample (number of samples) for methods based on subsampling (argument |
reps |
Number of random subsamples. Specifies how many times the fixed number of samples (specified by |
method |
Beta-diversity algorithm used to calculate theta measure. Partial match to |
q |
Generalization of Whittaker's multiplicative beta diversity for abundance data (only if |
rarefaction |
Logical value, which applies for |
beta.div.method |
Argument for the function |
beta.div.sqrt.D |
Argument for the function |
beta.div.samp |
Argument for the function |
beals.file |
Contains pre-calculated matrix of species co-occurrences. Can be used if |
pa.transform |
Logical; should the compositional data be transformed into presence-absence form? This choice applies only if |
force.subsample |
Logical; should the subsampling be forced even for beta diversity metrics which are not influenced by sample size ( |
parallel |
Logical; should be the parallel calculation used? |
no.cores |
Number of cores (if |
remove.out |
Logical; should be the algorithm removing outliers (sensu Botta-Dukat 2012) applied? |
out.metric |
Dissimilarity metric used to calculate outliers which should be removed ( |
verbal |
Logical; if |
juicer |
Logical argument specific for launching the function from JUICE software; logical (default = F) - is the function launched from JUICE? If |
tcltk |
Logical argument specific for launching the function from JUICE sofware. |
temp.matrix |
Internal argument; matrix with species composition of plots containing target species. |
sci.name |
Internal argument; the name of the species for which the current calculation is done. |
sp |
Internal argument; the order of the species for which the current calculation is done. |
win.pb |
Internal argument. |
x |
Internal argument of |
include |
Internal argument of |
The function calculate.theta
returns data.frame, with species in rows and the following columns:
sci.name
: scientific name of the species;
local.avgS
: average local species richness (average number of species in plots containing target species);
occur.freq
: occurrence frequency: number of plots in which species occurs;
meanco
: mean number of co-occurring species in subset of selected plots;
meanco.sd
: sd of the number of co-occurring species in subset of selected plots;
meanco.u, meanco.l
: upper and lower confidence interval of the number of co-occuring species in subset of selected plots;
theta
: calculated theta value;
theta.sd
: standard deviation of calculated theta values for individual subsets (not available for metrics which are not calculated by subsampling).
David Zeleny (zeleny.david@gmail.com). Partly based on codes written by Jason Fridley (Fridley et al. 2007) and David Zeleny (Zeleny 2009), extended for other published algorithms and optimised for speed and applicability on large datasets. Function beals.2
is based on function beals
from vegan
, written by Miquel De Caceres and Jari Oksanen.
Baselga A., Jimenez-Valverde A. & Niccolini G. (2007): A multiple-site similarity measure independent of richness. Biology Letters, 3: 642-645.
Baselga A., Orme D., Villeger S., Bortoli J. & Leprieur F. (2013): betapart: Partitioning beta diversity into turnover and nestedness components. R package version 1.3. http://CRAN.R-project.org/package=betapart
Botta-Dukat Z. (2012): Co-occurrence-based measure of species' habitat specialization: robust, unbiased estimation in saturated communities. Journal of Vegetation Science, 23: 201-207.
Boulangeat I., Lavergne S., Van Es J., Garraud L. & Thuiller W. (2012): Niche breadth, rarity and ecological characteristics within a regional flora spanning large environmental gradients. Journal of Biogeography, 39: 204-214.
De Bello F., Lavergne S., Meynard C.N., Leps J. & Thuiller W. (2010): The partitioning of diversity: showing Theseus the way out of the labyrinth. Journal of Vegetation Science, 21: 992-1000.
Fridley J.D., Vandermast D.B., Kuppinger D.M., Manthey M. & Peet R.K. (2007): Co-occurrence based assessment of habitat generalists and specialists: a new approach for the measurement of niche width. Journal of Ecology, 95: 707-722.
Jost L. (2007): Partitioning diversity into independent alpha and beta components. Ecology, 88: 2427-2439.
Legendre P. & De Caceres M. (2013): Beta diversity as the variance of community data: dissimilarity coefficients and partitioning. Ecology Letters, 16:951-963.
Manthey M. & Fridley J.D. (2009): Beta diversity metrics and the estimation of niche width via species co-occurrence data: reply to Zeleny. Journal of Ecology, 97: 18-22.
Munzbergova Z. & Herben T. (2004): Identification of suitable unoccupied habitats in metapopulation studies using co-occurrence of species. Oikos, 105: 408-414.
Zeleny D. (2009): Co-occurrence based assessment of species habitat specialization is affected by the size of species pool: reply to Fridley et al. (2007). Journal of Ecology, 97: 10-17.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | sc <- sample.comm (simul.comm (totS = 100), Np= 100)
niches <- sc$simul.comm$range
additive <- calculate.theta (sc$a.mat, method = 'add')
multi <- calculate.theta (sc$a.mat, method = 'multiplicative')
beals <- calculate.theta (sc$a.mat, method = 'beals')
bray <- calculate.theta (sc$a.mat, method = 'beta.div',
beta.div.method = 'percentdiff', beta.div.sqrt.D = TRUE)
# Visualize the relationship using function pairs with Spearmann's correlation
# in the boxes above diagonal (see Examples in ?pairs)
panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor, ...)
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r <- abs(cor(x, y, method = 'spearman'))
txt <- format(c(r, 0.123456789), digits = digits)[1]
txt <- paste0(prefix, txt)
if(missing(cex.cor)) cex.cor <- 0.8/strwidth(txt)
text(0.5, 0.5, txt, cex = cex.cor * r)
}
pairs (cbind (niches = niches[names (niches) %in% additive$sci.name],
additive = additive$theta, multi = multi$theta, beals = beals$theta, bray = bray$theta),
upper.panel = panel.cor)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.