xy2index {BoardGames} | R Documentation |
Converts a set of x,y coordinates into a matrix index.
Description
This function converts a set of unit x,y coordinates into a matrix index.
Usage
xy2index(data, x, y)
Arguments
data |
Matrix or data frame. |
x |
x-coordinate |
y |
y-coordinate |
Examples
M = matrix(1:20,4,5)
xy2index(data=M, x=3, y=2)
[Package BoardGames version 1.0.0 Index]