matrixCellFromXY: matrixCellFromXY

Description Usage Arguments Value

View source: R/move.R

Description

Gets the cell ID within a matrix using the position format ('c(X, Y)') suppplied by 'move.list'.

Usage

1
matrixCellFromXY(pos, matsize)

Arguments

pos

vector, a position in the format 'c(X, Y)' i.e. 'c(col, row)'. Intended to accept a single position in 'move.list'

matsize

integer, the size of the square matrix on which the simulation is being run

Value

integer, the cell ID indicated by the X, Y coordinates.


syanco/checkyourself documentation built on Jan. 18, 2021, 4:50 a.m.