next up previous
Next: User-level Constructs Up: MIT REVERSIBLE COMPUTING PROJECT Previous: What type of

Overview of R Syntax

R programs are currently represented using nested, parenthesized lists of symbols and numbers, as in Lisp. Similarly to Lisp, the first element of a list may be a symbol that identifes the kind of construct that the list is representing, for example, a function definition, an if statement, a let construct for variable binding. However, in R, currently some constructs may also be denoted using infix notation, in which the identifying symbol is the second element of the list instead of the first. Many of these infix lists have a C-like syntax and behavior, for example, the (a += b) statement which adds b into a. Infix notation is also often used in subexpressions of a statement which are intended to evaluate to a value, for example, (a + b) in the statement (print (a + b)).



Michael Frank
Mon Nov 3 16:33:38 EST 1997