terminalActivate | R Documentation |
Ensure terminal is running and optionally bring to front in RStudio.
terminalActivate(id = NULL, show = TRUE)
id |
The terminal id. The |
show |
If TRUE, bring the terminal to front in RStudio. |
The terminalActivate
function was added in version 1.1.350 of
RStudio.
## Not run:
# create a hidden terminal and run a lengthy command
termId = rstudioapi::terminalCreate(show = FALSE)
rstudioapi::terminalSend(termId, "sleep 5\n")
# wait until a busy terminal is finished
while (rstudioapi::terminalBusy(termId)) {
Sys.sleep(0.1)
}
print("Terminal available")#'
rstudioapi::terminalActivate(termId)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.