as.SpeciesDistribution(x)
## S3 method for class 'data.frame':
as.SpeciesDistribution(x)
## S3 method for class 'integer':
as.SpeciesDistribution(x)
## S3 method for class 'numeric':
as.SpeciesDistribution(x)
## S3 method for class 'SpeciesDistribution':
plot(x, \dots, Distribution = NULL,
type = "b", log = "y", main = NULL, xlab = "Rank", ylab = NULL)
is.SpeciesDistribution(x)
as.ProbaVector(x, Correction = "None", Unveiling = "None",
RCorrection = "Chao1", JackOver = FALSE, CEstimator = "ZhangHuang",
CheckArguments = TRUE)
## S3 method for class 'data.frame':
as.ProbaVector(x, Correction = "None", Unveiling = "None",
RCorrection = "Chao1", JackOver = FALSE, CEstimator = "ZhangHuang",
CheckArguments = TRUE)
## S3 method for class 'integer':
as.ProbaVector(x, Correction = "None", Unveiling = "None",
RCorrection = "Chao1", JackOver = FALSE, CEstimator = "ZhangHuang",
CheckArguments = TRUE)
## S3 method for class 'numeric':
as.ProbaVector(x, Correction = "None", Unveiling = "None",
RCorrection = "Chao1", JackOver = FALSE, CEstimator = "ZhangHuang",
CheckArguments = TRUE)
is.ProbaVector(x)
as.AbdVector(x, Round = TRUE)
## S3 method for class 'data.frame':
as.AbdVector(x, Round = TRUE)
## S3 method for class 'integer':
as.AbdVector(x, Round = TRUE)
## S3 method for class 'numeric':
as.AbdVector(x, Round = TRUE)
is.AbdVector(x)
"lnorm"
(log-normal), "lseries"
(log-series), "geom"
(geometric) or "bstick"
(broken stick). If NULL
, no distribution is fitted. See
TRUE
(by default), values of x
are set to integer to create an AbdVector
. This is useful if original abundances are not integers (this is often the case for MetaCommunit
"None"
(no correction, the default value), "Chao2013"
, "Chao2015"
or "ChaoShen"
."None"
(default, no species is added), "unif"
(uniform: all unobserved species have the same probability) or Richness
to evaluate the total number of species. "Chao1"
is the default value.TRUE
, retain the jackknife order immediately superior to the optimal one, usually resulting in the overestimation of the number of species. Default is FALSE
. Ignored if RCorrection
is not "Jackknife"
.Coverage
to evaluate the sample coverage. "ZhangHuang"
is the default value.plot
."xy"
for both axes. Default is "y"
.NULL
(by default), there is no title.NULL
(by default), "Probability" or "Abundance" is chosen according to the object class.plot
.TRUE
, the function arguments are verified. Should be set to FALSE
to save time when the arguments have been checked elsewhere.SpeciesDistribution
objects include AbdVector
and ProbaVector
objects.
as.AbdVector
just sets the class of the numeric or integer x
so that appropriate versions of community functions (generic methods such as Diversity
) are applied. Abundance values are rounded (by default) to the nearest integer.
as.ProbaVector
normalizes the vector so that it sums to 1. If Correction
is not "None"
, the observed abundance distribution is used to estimate the actual species distribution. The list of species will be changed: zero-aundance species will be cleared, and some unobserved species will be added. First, observed species probabilities are estimated folllowing Chao and Shen (2003), i.e. input probabilities are multiplied by the sample coverage, or according to more sophisticated models: Chao et al. (2013, single-parameter model), or Chao et al. (2015, two-parameter model). The total probability of observed species equals the sample coverage. Then, the distribution of unobserved species can be unveiled: their number is estimated according to RCorrection
(if the Jackknife estimator is chosen, the JackOver
argument allows using the order immediately over the optimal one). The coverage deficit (1 minus the sample coverage) is shared by the unobserved species equally (Unveiling = "unif"
, Chao et al., 2013) or according to a geometric distribution (Unveiling = "geom"
, Chao et al., 2015).
These functions can be applied to data frames to calculate the joint diversity (Gregorius, 2010).
SpeciesDistribution
objects can be plotted. The plot
method returns the estimated parameters of the fitted distribution. The broken stick has no parameter, so the maximum abundance is returned.rgeom
, rlnorm
, rCommunity
# Load Paracou data (number of trees per species in two 1-ha plot of a tropical forest)
data(Paracou618)
# Ns is the total number of trees per species
Ns <- as.AbdVector(Paracou618.MC$Ns)
# Whittaker plot, poorly fitted by a log-normal distribution
plot(Ns, Distribution = "lnorm")
Run the code above in your browser using DataLab