| mv {cursr} | R Documentation |
Move Cursor
Description
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).
Usage
mv(row = 0L, col = 0L)
Arguments
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. |
Details
The user must be in a terminal to use the functionality; it will not work in RStudio or the R GUI.
Value
NULL
See Also
mv_to to move to a specific location on the screen.
Other moving functions:
mv_col(),
mv_row(),
mv_to()
Examples
# 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)
[Package cursr version 0.1.0 Index]