Swap the position of two elements in a grid.
Examples
if (FALSE) { # \dontrun{
x <- randomGrid()
swapElements(x, 1, 3) # swap elements 1 and 3
swapElements(x, 1:2, 3:4) # swap element 1 with 3 and 2 with 4
} # }
Swap the position of two elements in a grid.
if (FALSE) { # \dontrun{
x <- randomGrid()
swapElements(x, 1, 3) # swap elements 1 and 3
swapElements(x, 1:2, 3:4) # swap element 1 with 3 and 2 with 4
} # }