Skip to contents

Models extrapolate when projected to climates absent from the calibration data. This flags rows where at least one variable lies outside the range found in reference (a simple univariate check, like the "clamping mask" of Maxent and biomod2).

Usage

outside_range(x, reference)

Arguments

x

Matrix or data.frame of values to check.

reference

Matrix or data.frame of calibration values (columns matched by name).

Value

Logical vector, TRUE = outside the range of at least one variable.

Examples

ref <- data.frame(t = c(0, 10), p = c(100, 900))
outside_range(data.frame(t = c(5, -2), p = c(500, 500)), ref)
#> [1] FALSE  TRUE