mv_to: Move Cursor to Specified Location

Description Usage Arguments Details Value See Also Examples

View source: R/2-Move.R

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

1
mv_to(row = 1L, col = 1L)

Arguments

row

positive integer specifying the console row. If row has two or more values, the second value replaces col.

col

positive integer specifying the console column.

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 move relative to the current location on the screen.

Other moving functions: mv_col(), mv_row(), mv()

Examples

1
2
3
4
5
6
# move the cursor to the 2nd row, 4th column
mv_to(2, 4)

# alternatively, you can specify the coordinates as a vector.
loc <- c(2, 4)
mv_to(loc)

cursr documentation built on Jan. 13, 2021, 7:35 a.m.