dot-alpha: Calculate Alpha Irreplaceability

.alphaR Documentation

Calculate Alpha Irreplaceability

Description

This function calculates Alpha Irreplaceability for a single feature.

Usage

.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

\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/cobi.13806")}

Examples

.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 May 29, 2024, 9:38 a.m.