dot-alpha: Calculate Alpha Irreplaceability

Description Usage Arguments Details Value Author(s) References Examples

Description

This function calculates Alpha Irreplaceability for a single feature.

Usage

1
.alpha(local, global, target, triage = FALSE, na.allow = FALSE)

Arguments

local

numeric - The feature's local representation at the site.

global

numeric - The feature's globally available representation.

target

numeric - The feature's target.

triage

logical - Should features with unachievable targets be ignored? Defaults to FALSE. If FALSE, these species will be always assigned an Alpha irreplaceability of 1 wherever they occur. If TRUE, these species will always be assigned an Alpha irreplaceabiltiy of 0.

na.allow

logical - Return NA if NA values are found in the inputs?

Details

If na.allow is TRUE and any of the required values is NA, returns NA.

If triage is set to TRUE, alpha irreplaceability is set to 0 if the target cannot be achieved (i.e., if the target is greater than the global value), and calculated normally otherwise.

Value

A number between 0 and 1.

Author(s)

Daniele Baisero, daniele.baisero@gmail.com

References

doi: 10.1111/cobi.13806

Examples

1
2
3
4
5
6
7
8
9
.alpha(local=0,    global=100,  target=50)
.alpha(local=15,   global=100,  target=50)
.alpha(local=35,   global=100,  target=50)
.alpha(local=49.5, global=100,  target=50)
.alpha(local=55,   global=100,  target=50)
.alpha(local=100,  global=100,  target=0)
.alpha(local=5,    global=100,  target=110)
.alpha(local=5,    global=100,  target=110, triage=TRUE)
.alpha(local=32,   global=100,  target=NA, na.allow = TRUE)

proxirr documentation built on Nov. 14, 2021, 1:07 a.m.