rstudioapi (version 0.13)

terminalClear: Clear Terminal Buffer

Description

Clears the buffer for specified terminal.

Usage

terminalClear(id)

Arguments

id

The terminal id. The id is obtained from terminalList(), terminalVisible(), terminalCreate(), or terminalExecute().

Examples

Run this code

if (FALSE) {
termId <- rstudioapi::terminalCreate()
rstudioapi::terminalSend(termId, 'ls -l\n')
Sys.sleep(3)
rstudioapi::terminalClear(termId)
}


Run the code above in your browser using DataCamp Workspace