Skip to contents

This function categorizes the risk of establishment by Lycorma delicatula according to our risk quadrant framework, which is the intersection between predictions made by the global and regional-scale models. It will return which quadrant a suitability value will fall into on an xy-scatter.

Usage

calculate_risk_quadrant(suit.x, suit.y, thresh.x, thresh.y)

Arguments

suit.x

Suitability values comprising the x-axis. Global-scale model is usually placed along the x-axis.

suit.y

Suitability values comprising the y-axis. Regional-scale ensemble model is usually placed along the x-axis.

thresh.x

The threshold for suitability accompanying the x-axis model values.

thresh.y

The threshold for suitability accompanying the y-axis model values.

Value

Returns a data frame. Values will be one of: "extreme", "high", "moderate", or "low". These correspond with our interpretation of the risk quadrant plots we have created:

  • extreme risk = quadrant 4 (upper right)

  • high risk = quadrant 3 (upper left)

  • moderate risk = quadrant 2 (bottom right)

  • low risk = quadrant 1 (bottom left)

Details

#'The function requires the packages 'dplyr' and 'cli'.

Input data formats:

  • param "suit" = matrix of suitability values

  • param "thresh" = numeric

Input suitability data can be created using the function predict_xy_suitability, or extracted from a raster using terra::extract(), as needed.

Examples