Clears the buffer for specified terminal.
terminalClear(id)
The terminal id. The id
is obtained from
terminalList()
, terminalVisible()
,
terminalCreate()
, or terminalExecute()
.
The terminalClear
function was added in version 1.1.350 of
RStudio.
if (FALSE) {
termId <- rstudioapi::terminalCreate()
rstudioapi::terminalSend(termId, 'ls -l\n')
Sys.sleep(3)
rstudioapi::terminalClear(termId)
}