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

From: Henrik Bengtsson <hb_at_maths.lth.se>
Date: Fri 17 Feb 2006 - 20:55:11 EST

On 2/16/06, Michael <comtech.usa@gmail.com> wrote:
> I am actually using Rgui on Windows...
>
> What can I do?

The only way I can think of is to do write a lot of empty lines, e.g.

cat(rep("\n",64))

You will not get the prompt at the upper-left corner. Better than nothing.

/Henrik

> There is no way to programmatically clear screen?
>
> On 2/16/06, Henrik Bengtsson <hb@maths.lth.se> wrote:
> >
> > Hi,
> >
> > depends on what type of terminal you are running. For example, if you
> > run R in a VT100 terminal, you can try
> >
> > cat("The following VT100 escape sequence will clear the screen on a
> > VT100 terminal\n")
> > cat("\033[2J") # <ESC>[2J == Clear Screen
> > cat("If the screen was cleared you should only see this sentence.\n")
> >
> > i.e.
> >
> > vt100ClearScreen <- function(...) cat("\033[2J")
> >
> > Some links:
> > http://www.fh-jena.de/~gmueller/Kurs_halle/esc_vt100.html
> > http://en.wikipedia.org/wiki/VT100
> >
> > Note, this is not guaranteed to work everywhere. To the best of my
> > knowledge, you will not be able to do anything like this in Rgui on
> > Windows.
> >
> > Cheers
> >
> > Henrik
> >
> >
> > On 2/16/06, Michael <comtech.usa@gmail.com> wrote:
> > > Any funcation that is callable from my program, instead of pressing
> > keys?
> > >
> > > Thanks a lot!
> > >
> > >
> > > On 2/16/06, Christian Schulz <ozric@web.de> wrote:
> > > >
> > > > ctrl - e & l
> > > >
> > > > >HI all,
> > > > >
> > > > >How to clear the screen in R-console?
> > > > >
> > > > >Thanks a lot@!
> > > > >
> > > > > [[alternative HTML version deleted]]
> > > > >
> > > > >______________________________________________
> > > > >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
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > > [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > 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 Fri Feb 17 21:14:51 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 14:08:40 EST