xy2index: Converts a set of x,y coordinates into a matrix index.

Description Usage Arguments Examples

View source: R/xy2index.R

Description

This function converts a set of unit x,y coordinates into a matrix index.

Usage

1
xy2index(data, x, y)

Arguments

data

Matrix or data frame.

x

x-coordinate

y

y-coordinate

Examples

1
2
M = matrix(1:20,4,5)
xy2index(data=M, x=3, y=2)

BoardGames documentation built on May 2, 2019, 3:45 a.m.