[R] clear screen?
murdoch at stats.uwo.ca
Mon May 4 12:50:40 CEST 2009
On 03/05/2009 6:50 PM, Charles Annis, P.E. wrote:
> I’ve been using this routine for several years. I’m sorry, I don’t remember
> where I got it. It works as it should, viz. it blanks the R console. But
> it requires package rcom and now that requires rscproxy.
> cls <-
> function ()
> wsh <- comCreateObject("Wscript.Shell")
> comInvoke(wsh, "SendKeys", "\f")
> Loading required package: rcom
> Loading required package: rscproxy
> This seems like overkill to me just to blank the R console, especially since
> I am trying to diminish the number of necessary packages to support my
> home-brew package.
> So, is there an easier way to blank the R console in Windows?
Ctrl-L will do it. If you want to put it in a function, I don't think so.
An item that has been on my wish list for a long time is to rewrite the
menu system in the Windows gui so that all items can be invoked from R
code. It's been sitting there in the section entitled "I wish someone
else would do this." It would not be hard, but it would be a lot of
> R version 2.8.1 (2008-12-22)
> LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
> States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
> attached base packages:
>  splines tcltk stats graphics grDevices utils datasets
> methods base
> other attached packages:
>  rcom_2.1-1 rscproxy_1.2-0 survival_2.35-3
> RColorBrewer_1.0-2 RODBC_1.2-5 myhomebrew
> loaded via a namespace (and not attached):
>  tools_2.8.1
> Charles Annis, P.E.
> Charles.Annis at StatisticalEngineering.com
> phone: 561-352-9699
> eFax: 614-455-3265
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help