Move construct or element in grid to the left, right, up or down.
Source:R/repgrid-basicops.r
move.Rd
Move element in grid to the right.
Arguments
- x
repgrid
object.- pos
Row (column) number of construct (element) to be moved leftwards, rightwards, upwards or downwards. The default is
0
. For indexes outside the range of the grid no moving is done.
Examples
if (FALSE) {
x <- randomGrid()
left(x, 2) # 2nd element to the left
right(x, 1) # 1st element to the right
up(x, 2) # 2nd construct upwards
down(x, 1) # 1st construct downwards
}