Learn R Programming

screenshot (version 0.9.2)

xy_pos: Get xy position of a value in a matrix Helper function for locate_ndl_in_hay().

Description

Get xy position of a value in a matrix Helper function for locate_ndl_in_hay().

Usage

xy_pos(mt, val)

Value

A numeric pairs of xy location.

Arguments

mt

A matrix

val

A matrix

Examples

Run this code
nrow <- 4
mt <- matrix(1:12, nrow = nrow)
xy_pos(mt, 5)

Run the code above in your browser using DataLab