Hi, I have several small question in R, 1) How to display all the variables in current workspace? 2) How to write a long command in two lines. Suppose one command line is long to be put within one line. Thanks! tang
On Dec 14, 2004, at 6:30 AM, jing tang wrote:> Hi, > I have several small question in R, > 1) How to display all the variables in current workspace?ls()> 2) How to write a long command in two lines. Suppose one command line > is long to be put within one line.Just hit return in most cases. R is smart enough to know if you are in the middle of a function body. Also, it is important to read the manual, An Introduction to R: http://cran.r-project.org/manuals.html Sean
On Tue, 14 Dec 2004 12:30:31 +0100, "jing tang" <tang_chalmers at hotmail.com> wrote:>Hi, >I have several small question in R, >1) How to display all the variables in current workspace?ls() or objects()>2) How to write a long command in two lines. Suppose one command line is >long to be put within one line.Just continue on the next line, making sure that the starting line is syntactically incomplete. For example x + y is a single statement "x + y", whereas x + y is two statements. You can do this by having unbalanced parentheses in the first line, or ending it with an operator, or maybe other ways (but it's too early in the morning for me to think of them). Duncan Murdoch
jing tang wrote:> Hi, > I have several small question in R, > 1) How to display all the variables in current workspace?See ?ls> 2) How to write a long command in two lines. Suppose one command line is > long to be put within one line.Just do it at a place where the command is not syntactically complete, or use {}.> Thanks! > tang > > ______________________________________________ > R-help at 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.htmlPlease do as you are asked above, and in particular please do read documentation. Uwe Ligges
El Martes, 14 de Diciembre de 2004 12:30, jing tang escribi??:> Hi, > I have several small question in R, > 1) How to display all the variables in current workspace?ls()> 2) How to write a long command in two lines. Suppose one command line is > long to be put within one line.just push 'Enter' key, a '+' will appear so you can continue antonio> Thanks! > tang > > ______________________________________________ > R-help at 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