vuln: Multidimensional vulnerability index

Description Usage Arguments Value Examples

Description

Multidimensional vulnerability index, using truncated or extended niches.

Usage

1
2
3
vuln(spe, y, ybin, yinv, na.rm = TRUE, fullinfo = TRUE, ...)

gv(obj, pick = 1, ...)

Arguments

spe

species abundance or occurrence matrix (response variables).

y

vector, matrix, or list of explanatory variables (climate, fire, etc), where rows correspond to rows in spe.

ybin

optional, data.frame or list of data.frames from bingrid, with binned explanatory variables from rasterizing. Function gives extended niches if supplied, possibly truncated niches if not supplied.

yinv

vector of logicals, in order of y, defining which explanatory variables y should be 'inverted' (e.g., low moisture = high vulnerability). Defaults to rep(FALSE, NCOL(y)).

na.rm

logical, indicating whether to strip NA values before computation. Default is na.rm = TRUE

fullinfo

logical, default fullinfo=TRUE propagates any NA cases that occur in any y variable; when fullinfo=TRUE, percentiles will be based only on non-NA y cases.

...

further arguments passed to other functions.

obj

object of class 'vuln'.

pick

numeric, indicating which vulnerability metric (1,2,3).

Value

List object of class 'vuln', containing:

v

y values at all sites in spe.

ve

y values at all sites in ybin.

vo

vulnerable occurrences matrix.

va

vulnerable abundances matrix.

t1

values for 1st vulnerability index, describing the proportion of observed species which are vulnerable.

t2

values for 2nd vulnerability index, describing the community-mean percentile at the observed site.

t3

values for 3rd vulnerability index, describing the safety margin as the deviation of community-mean upper y limits from the observed y value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Load data
## Not run: 
data(braun, package='ecole')
spe <- braun$spe
env <- braun$env
## Vulnerability estimates
v <- vuln(spe, y=env$bio1) # w/o bingrid, may be 'truncated' niche
## Mapping
d <- data.frame(env, t1 = gv(v,1), t2 = gv(v,2), t3 = gv(v,3))
f <- function(d, j='bio1', ...){
     cc <- c("#420A6899","#65156E99","#89226A99",
             "#AD305D99","#CC424899","#E75D2E99",
             "#F7821299","#FCAA0F99","#F6D64599")
     plot(d$lat, d$lon, col=cc[cut(d[,j],breaks=9)],pch=16,main=j)
}
par(mfrow=c(2,2), bty='L', las=1)
f(d, 'bio1')
f(d, 't1')
f(d, 't2')
f(d, 't3')

## End(Not run)

phytomosaic/vuln documentation built on Sept. 21, 2019, 8:23 a.m.