[R] clear console

Bos, Roger roger.bos at us.rothschild.com
Thu Apr 5 13:58:59 CEST 2007


This has been asked previously and I happened to have saved the final
answer:

cls <- function() {
       require(rcom)
       wsh <- comCreateObject("Wscript.Shell")
       comInvoke(wsh, "SendKeys", "\014")
       invisible(wsh)
}
 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Gabor
Grothendieck
Sent: Thursday, April 05, 2007 7:39 AM
To: Robert McFadden
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] clear console

Check out:

http://tolstoy.newcastle.edu.au/R/help/06/02/21634.html

On 4/5/07, Robert McFadden <robert-mcfadden at o2.pl> wrote:
> Hi R Users,
>
> In Windows I can clear console using CTRL-L, but can I do this by 
> certain command in my programs? e.g
>
> for (i in 1:100000){
>
> something
>
> clear console
>
> }
>
>
>
> Best,
>
> Rob
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

********************************************************************** * 
This message is for the named person's use only. It may 
contain confidential, proprietary or legally privileged 
information. No right to confidential or privileged treatment 
of this message is waived or lost by any error in 
transmission. If you have received this message in error, 
please immediately notify the sender by e-mail, 
delete the message and all copies from your system and destroy 
any hard copies. You must not, directly or indirectly, use, 
disclose, distribute, print or copy any part of this message 
if you are not the intended recipient.



More information about the R-help mailing list