move: Determine the new position when moving from the current...

View source: R/getpath.R

moveR Documentation

Determine the new position when moving from the current position in a given direction

Description

Determine the new position when moving from the current position in a given direction

Usage

move(curpos, dir, method = c("in.occupancy", "in.plane"))

Arguments

curpos

current position (i, j) in the occupancy matrix

dir

direction in which we move ("d", "u", "r" or "l")

method

choice of method ("in.occupancy" means the (current/new) position is given in terms of (row, column) indices in the occupancy matrix; "in.plane" means the directions are interpreted as in the (x,y)-plane).

Value

new position in the occupancy matrix

Author(s)

Marius Hofert and Wayne Oldford


zenplots documentation built on Nov. 8, 2023, 1:10 a.m.