left: Move construct or element in grid to the left, right, up or down.
Description
Move element in grid to the right.
Usage
left(x, pos = 0)
right(x, pos = 0)
up(x, pos = 0)
down(x, pos = 0)
Value
repgrid object.
repgrid object
repgrid object
repgrid object
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.
if (FALSE) {
x <- randomGrid()
left(x, 2) # 2nd element to the leftright(x, 1) # 1st element to the rightup(x, 2) # 2nd construct upwardsdown(x, 1) # 1st construct downwards}