Which function can I use to clear the console in R and RStudio

+1 vote
Apr 17, 2018 in Data Analytics by shams
• 3,670 points
90,852 views

2 answers to this question.

+1 vote

Description                   Windows & Linux           Mac

Clear console                      Ctrl+L                     Ctrl+L

cat("\014")  is the code to send CTRL+L to the console and therefore will clear the screen.

You can also type cat("\f")

Transform data into actionable insights with our Data Analytics Course – Enroll today!

answered Apr 17, 2018 by anonymous
It works, is completely true.
0 votes

Hi,

The shortest and the quickest way to clear the global environment in R is by using shortcut keys from the keyboards. Simply hit Ctrl+L on the keyboard and you will see that everything written in the console will be erased and the console will be cleared. 

answered Dec 14, 2020 by MD
• 95,460 points
Ctrl+L actual not clear the screen just shift several line if you scroll up previous typing still there, as using clear command in bash terminal. Actually command equal to reset CLI in bash shell.
To the edureka.co admin, You always provide great examples and real-world applications, thank you for your valuable contributions.

Related Questions In Data Analytics

0 votes
0 answers

Function to clear the console in R and RStudio

I'm curious if there is a way ...READ MORE

Jun 10, 2022 in Data Analytics by Avinash
• 1,260 points
839 views
+1 vote
1 answer

How can I use which() function in R ?

which() function determines the position of elements ...READ MORE

answered Sep 25, 2018 in Data Analytics by Daisy
• 8,140 points
7,966 views
0 votes
1 answer

How to write a custom function which will replace all the missing values in a vector with the mean of values in R?

Consider this vector: a<-c(1,2,3,NA,4,5,NA,NA) Write the function to impute ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
5,291 views
0 votes
1 answer

How can I import a file in R without giving the destination/file path to the specified file?

You can use the window explorer to ...READ MORE

answered Aug 28, 2018 in Data Analytics by Abhi
• 3,720 points

edited Aug 28, 2018 by Vardhan 3,768 views
+1 vote
2 answers