Isr: Index of Summed Rarity

Description Usage Arguments Details Value Warning Author(s) References See Also Examples

Description

Calculates the Index of Relative Rarity for a single or a set of assemblages of species. The index of summed rarity consists in summing the rarity weights of species in the assemblage, with the possibility of normalising between 0 (the assemblage has only minimum-weight species) and 1 (value of the complete pool of species (see details)).

Usage

1
Isr(assemblages, W, abundance = FALSE, Wmin = min(W), normalise = FALSE)

Arguments

assemblages

vector, matrix or data.frame. Data of the assemblage(s) of species for which the Index will be calculated. If matrix or data.frame, species are in rows and assemblages are in columns (see details).

W

vector, matrix or data.frame. Rarity weights of the species. If matrix or data.frame, species are in rows (see details).

abundance

logical. If TRUE, then abundance values in assemblages are taken into account to calculate the Index of Relative Rarity.

Wmin

decimal or vector. Minimum weight(s)

normalise

logical. If TRUE, then the Isr will be rescaled between 0 and 1 (see formula in details). Cannot be used if abundance = TRUE.

Details

assemblages can contain a single (vector) or several (matrix or data.frame) assemblages. If assemblages is a vector, values must be named with species names (e.g. with names(assemblages) <- sp.names). If assemblages is a matrix or a data.frame, then rows must be named with species names.

All the species of assemblages must be contained in W

W can contain a single vector of rarity weights, or a matrix or a data.frame of rarity weights (e.g. to calculate different Indices of Summed Rarity for different scales). If W is a vector, values must be named with species names. If W is a matrix or a data.frame, then species are in rows and each column contains rarity weights. Rows must be named with species names.

If the input of rWeights is directly entered, then columns Q (occurrence), R (rarity status) and cut.off (rarity cut-off points) will be dropped.

Formula implemented in this function:

Species with NA weights are excluded when indices are computed (they are kept for richness).

Value

A data.frame containing the Indices of Relative Rarity and the species richness of the assemblage(s).

Warning

Column names of W with names like "Q", "R", "cut.off", "Q1" "Q2" "Q3" and so on, "R1", "R2" "R3" and so on, "cut.off1", "cut.off2", and so on will be ignored.

Author(s)

Boris Leroy [email protected]

References

Leroy B., Petillon J., Gallon R., Canard A., & Ysnel F. (2012) Improving occurrence-based rarity metrics in conservation studies by including multiple rarity cut-off points. Insect Conservation and Diversity, 5, 159-168.

Leroy B., Canard A., & Ysnel F. 2013. Integrating multiple scales in rarity assessments of invertebrate taxa. Diversity and Distributions, 19, 794-803.

See Also

rWeights, Irr

Examples

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Input rarity weights
data(spid.occ)

# Example of a single scale dataset
regional.occ <- spid.occ$occurMA
names(regional.occ) <- rownames(spid.occ)
head(regional.occ)

# Preparation of rarity weights
rarity.weights <- rWeights(regional.occ)

# Generation of an assemblage matrix
assemblages.matrix <- cbind(assemblage.1 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.2 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.3 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.4 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.5 = sample(c(0, 1), 50, replace = TRUE))
# Random attribution of names to the sampled species
rownames(assemblages.matrix) <- sample(names(regional.occ), 50, replace = FALSE)
head(assemblages.matrix)

# Calculation of Isr
Isr(assemblages.matrix, rarity.weights)
Isr(assemblages.matrix, rarity.weights, normalise = TRUE)


# Example of a multi scale dataset
rarity.weights <- rWeights(spid.occ, extended = TRUE)
head(rarity.weights)

# Generation of an assemblage matrix
assemblages.matrix <- cbind(assemblage.1 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.2 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.3 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.4 = sample(c(0, 1), 50, replace = TRUE),
                            assemblage.5 = sample(c(0, 1), 50, replace = TRUE))
rownames(assemblages.matrix) <- sample(names(regional.occ), 50, replace = FALSE)
head(assemblages.matrix)

# Calculation of Isr
Isr(assemblages.matrix, rarity.weights)
Isr(assemblages.matrix, rarity.weights, normalise = TRUE)

Rarity documentation built on May 30, 2017, 8:21 a.m.