Cumulative abundance profile (CAP)
Functions to calculate cumulative abundance profiles (CAPs), to build matrices from them, and to summarize several profiles.
1 2 3 4
A stratified vegetation data set (see function
A function or the name of a function to be applied to each cumulative abundance value.
A logical flag to indicate extra output.
An object of class '
The type of information that the resulting matrix should contain. Either
A numerical vector containing the weight for size class. If
A vector used as a factor to calculate average or quantile profiles per each level. Alternatively, an object of class
Probability value for which the quantile is desired. By default the median is given.
CAP replaces the abundance value of a size class by the sum of abundances in this and larger size classes (strata). Thus, upper classes contain smaller abundance values than lower classes, creating a cumulative abundance profile. Function
CAP2matrix takes an object of class '
CAP' and returns a data matrix, where values differ depending on parameter
type="cumulative" simply reshapes the '
CAP' object (a list) into a matrix with as many rows as plot records and where columns are organized in blocks (there are as many blocks as species and each block has as many columns as size classes); (2)
type="total" returns a plot-by-species matrix where each value is the total abundance of the species in the plot (i.e. the CAP value at the ground level); (3)
type="volume" returns a plot-by-species matrix where each value is the sum of CAP values across size classes (a measure of the "volume" occupied by the species in the plot). When provided,
classWeights are used to weight size classes of the cumulative abundance profiles (for (1) and (3) only). Function
CAPcenters calculates the average abundance profile for a set of plot records. If
y is a factor, it is used to speficy groups of samples for which average profiles are to be calculated. If
y is an object of class '
vegclust' then the function returns the CAP centroids or medoids corresponding to the clustering result. Function
CAPquantile calculates a quantile profile for a set of CAPs. The usage of
y is the same as for
CAP returns an object of class '
CAP', similar to objects of class '
stratifiedvegdata' but where abundance values of upper size classes have beed added to those of lower size classes. Function
CAP2matrix returns a matrix with species as rows (columns depend on the value of
CAPquantile return an object of class '
Miquel De Cáceres, Forest Science Center of Catalonia.
De Cáceres, M., Legendre, P. & He, F. (2013) Dissimilarity measurements and the size structure of ecological communities. Methods in Ecology and Evolution 4: 1167-1177.
De Cáceres, M., Coll, L., Martín-Alcón, S., González-Olabarria, J.R. (submitted) A general method for the classification of forest stands using structure and composition.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
## Load stratified data data(medreg) ## Check that 'medreg' has correct class class(medreg) ## Look at the data for the third plot medreg[] ## Create cumulative abundance profile (CAP) for each plot medreg.CAP = CAP(medreg) ## Look at the profile of the third plot medreg.CAP[] ## Create matrix with species abundances medreg.X = CAP2matrix(medreg.CAP, type="total") head(medreg.X) ## Generate and plot average profile average.CAP = CAPcenters(medreg.CAP) plot(average.CAP) ## Generate and plot median profile median.CAP = CAPquantile(medreg.CAP, q = 0.5) plot(median.CAP)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.