top_n_focals {spatialrisk}R Documentation

Identify the focal indices with the highest values

Description

Generate a data.frame containing the cell indices of the focal cells with the n highest values. Additionally, include columns for the coordinates (xy) corresponding to the center of each cell.

Usage

top_n_focals(focal, n)

Arguments

focal

focal as output from terra::focal().

n

positive integer value greater or equal to 1.

Author(s)

Martin Haringa


[Package spatialrisk version 0.7.2 Index]