Hi, I wish build a R-script (or a R-function) that read a number from the keyboard and then process it. For example: from R I load the function X, that ask me the level of confidence "\alpha", by keyboard I write 5 and the function go on. Thanks in advance Paolo [[alternative HTML version deleted]]
Paolo Covelli wrote:> Hi, > > I wish build a R-script (or a R-function) that read a number from the keyboard and then process it. > For example: from R I load the function X, that ask me the level of confidence "\alpha", by keyboard I write 5 and the function go on.scan() Uwe Ligges> Thanks in advance > > Paolo > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> library("sm") > x <- ask("Enter a number")Enter a number: 5> x[1] 5 On Thu, 2004-07-15 at 11:41, Paolo Covelli wrote:> Hi, > > I wish build a R-script (or a R-function) that read a number from the keyboard and then process it. > For example: from R I load the function X, that ask me the level of confidence "\alpha", by keyboard I write 5 and the function go on. > > Thanks in advance > > Paolo > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Also, readline() -Don At 12:41 PM +0200 7/15/04, Paolo Covelli wrote:>Hi, > >I wish build a R-script (or a R-function) that read a number from >the keyboard and then process it. >For example: from R I load the function X, that ask me the level of >confidence "\alpha", by keyboard I write 5 and the function go on. > >Thanks in advance > >Paolo > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA
Hi List, does it exist a sintax-comand to clear thre console (the screen)? I' ve finded nothing on the standard manuals. (apart from the manual comand CTRL+L) Thank in advance Paolo [[alternative HTML version deleted]]
Paolo Covelli wrote:> does it exist a sintax-comand to clear thre console (the screen)? > I've finded nothing on the standard manuals. (apart from the manual > comand CTRL+L)You don't say what operating system you're using ..... Anyhow, as far as I know there is no built-in to clear the screen. But one is easy to build. On a Unix system you could do cl <- function(){system("clear")} then executing cl() will clear the screen for you. On a Windoze system I think replacing ``clear'' by ``cls'' in the definition of cl() should work. cheers, Rolf Turner