clear_console <- function(ask = F) {
if (ask == T) {
ask_var <- readline(prompt="Clear console? [T/F] ")
if (as.logical(ask_var) == F) {
stop("console was not cleared")
}
}
cat("\014")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.