getWindowIndex {nimbleSCR}R Documentation

Get window index

Description

From a set of windows, find the index of the window into which a given point falls. Can be applied to detection and habitat windows.

Usage

getWindowIndex(curCoords, lowerCoords, upperCoords)

Arguments

curCoords

Vector of coordinates of a single spatial point

lowerCoords, upperCoords

Matrices of lower and upper x- and y-coordinates of a set of windows. One row for each window.

Value

Index of the window where the given point falls; -1 is returned if the point does not fall in any window.

Author(s)

Pierre Dupont

Examples


sourceCoords <- c(1.5,2.2)
lowerCoords <- cbind(c(0,1,3,0),c(0,1,2,2))
upperCoords <- cbind(c(1,3,5,3),c(1,2,4,4))
getWindowIndex(sourceCoords, lowerCoords, upperCoords)


[Package nimbleSCR version 0.2.1 Index]