index2xy: Convert array index into xy location in matrix. Helper...

View source: R/locate_image.R

index2xyR Documentation

Convert array index into xy location in matrix. Helper function for locate_ndl_in_hay().

Description

Convert array index into xy location in matrix. Helper function for locate_ndl_in_hay().

Usage

index2xy(index, nrow)

Arguments

index, nrow

A numeric.

Value

       A numeric pair of xy location.

Examples

nrow <- 4
matrix(1:12, nrow = nrow)
purrr::map(1:12, index2xy, nrow = nrow)


screenshot documentation built on June 22, 2024, 10:30 a.m.