+1 vote
2 views
by (4.1k points)
I want a function to clear the console in R and RStudio instead of a keyboard function, Can someone tell me any?

2 Answers

0 votes
by (25.3k points)

You can use the following functions to clear the console in RStudio:

cat("\f")

cat("\014")

Both of these functions send CTRL + L to the console which is the keyboard shortcut used to clear the console.

0 votes
by (31.4k points)

You may define the following function

clc <- function() cat(rep("\n", 50))

which you can then call as clc().

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...