mv {cursr} | R Documentation |
Move cursor relative to its current position on the screen. Screen coordinates are given by (row, column)
with the position of the screen being (1, 1)
.
mv(row = 0L, col = 0L)
row |
number of rows in which to move the cursor. Positive values move the cursor down; negative values move the cursor up. If |
col |
number of columns in which to move the cursor. Positive values move the cursor forward; negative values move the cursor backwards. |
The user must be in a terminal to use the functionality; it will not work in RStudio or the R GUI.
NULL
mv_to
to move to a specific location on the screen.
Other moving functions:
mv_col()
,
mv_row()
,
mv_to()
# move the cursor down one and forward two
mv(1, 2)
# Alternatively, you can specify the coordinates as a single vector.
loc <- c(1, 2)
mv(loc)
# to move to the left one unit (only works if the current column is > 1)
mv(, -1)