Re: [R] clear console

2012-03-31 Thread Gabor Grothendieck
On Sat, Mar 31, 2012 at 9:53 AM, Rui Barradas wrote: > Hello, > > Try > > cls2 <- function(lines=25) cat(rep("\n", lines)) > cls2() > > It's simpler, and doesn't need any special package. > (In my system, R 2.14.1/Windows 7, i386 or x64,  '\f' didn't work.) > This may or may not be important but

Re: [R] clear console

2012-03-31 Thread Bert Gunter
Will cat(rep("\n",30)) do? This does not remove any objects from the global environment. That requires ?rm -- Bert On Sat, Mar 31, 2012 at 5:09 AM, mrzung wrote: > hi, > > I use  R - 2.15(32bit), and want to make a code to clear a console. > > Actually, I used to run following code to do that

Re: [R] clear console

2012-03-31 Thread Rui Barradas
Hello, Try cls2 <- function(lines=25) cat(rep("\n", lines)) cls2() It's simpler, and doesn't need any special package. (In my system, R 2.14.1/Windows 7, i386 or x64, '\f' didn't work.) Hope this helps, Rui Barradas -- View this message in context: http://r.789695.n4.nabble.com/clear-con

Re: [R] clear console

2012-03-31 Thread Gabor Grothendieck
On Sat, Mar 31, 2012 at 8:09 AM, mrzung wrote: > hi, > > I use  R - 2.15(32bit), and want to make a code to clear a console. > > Actually, I used to run following code to do that but after update the > version of R from 2.14 to 2.15, it doesn't work. > > cls <- function (t) { >        require(RDCO

[R] clear console

2012-03-31 Thread mrzung
hi, I use R - 2.15(32bit), and want to make a code to clear a console. Actually, I used to run following code to do that but after update the version of R from 2.14 to 2.15, it doesn't work. cls <- function (t) { require(RDCOMClient) wsh <- COMCreate("Wscript.Shell")