[R] Several questions in R

Duncan Murdoch murdoch at stats.uwo.ca
Tue Dec 14 12:55:40 CET 2004


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




More information about the R-help mailing list