Re: [R] how to clear screen in R-console?

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sat 18 Feb 2006 - 04:36:51 EST

Here is a version that uses rcom instead of RDCOMClient. This has the advantage that rcom is on CRAN.

cls <- function() {

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

}
cls() # test

On 2/17/06, Gabor Grothendieck <ggrothendieck@gmail.com> wrote:
> Here is a translation of Norm Olsen's vbscript code into pure R.
> This is intended for use with the Windows Rgui interface.
>
> cls <- function() {
> require(RDCOMClient)
> wsh <- COMCreate("Wscript.Shell")
> wsh$SendKeys("\014")
> invisible(wsh)
> }
> cls() # invoke
>
>
>
> On 2/17/06, Marcus Leinweber <leinweber@neuro.mpg.de> wrote:
> > have already tried this?
> >
> > http://finzi.psych.upenn.edu/R/Rhelp02a/archive/55752.html
> >
> > m.
> >
> >
> > > -----Original Message-----
> > > From: r-help-bounces@stat.math.ethz.ch
> > > [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Michael
> > > Sent: Thursday, February 16, 2006 9:23 PM
> > > To: Henrik Bengtsson
> > > Cc: R-help@stat.math.ethz.ch
> > > Subject: Re: [R] how to clear screen in R-console?
> > >
> > > I am actually using Rgui on Windows...
> > >
> > > What can I do?
> > >
> > > There is no way to programmatically clear screen?
> > >
> >
> > ______________________________________________
> > R-help@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
> >
>



R-help@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 Received on Sat Feb 18 05:11:19 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:34 EST