wrat: Write At a Specific Location

Description Usage Arguments Details Value See Also Examples

View source: R/5-Write.R

Description

Move cursor to specified location in the terminal screen, then print the supplied text. This function will only work in terminal, not the RStudio Console or R GUI.

Usage

1
wrat(yx, text, ...)

Arguments

yx

numeric vector specifying the (row, col) coordinates to print at

text

text to be written at yx

...

colors and attributes added to text. See wr, fg_on, bg_on, and attr_on for more details.

Details

The coordinates are given in matrix notation: (row, column), with the top-left corner of the screen being (1,1).

Value

NULL

See Also

Other writing functions: wrch(), wrkpl(), wrkp(), wr()

Examples

1
2
3
4
5
wrat(c(10,6), "CURSR")
wrat(c(4,1), "Hello World!", fg="red", attr=c("bf", "ul"))

mat <- rbind(c(5,2), c(10,5), c(1,19))
wrat(mat, "HI", fg="yellow")

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