Skip to content
Prev 33628 / 398506 Next

combining mathematical notation and value substitution

On Sat, 21 Jun 2003, Faheem Mitha wrote:
yes, in the sense that the lexer and parser won't choke when trying to
read the statement.

You could define a method for "*" that multiplied character strings (you
might have to work through defining Ops.character)
No, it would be less accurate (though arguably clearer). An expression is
not actually internally represented as a list of calls, just as
   list(quote(x*y), quote(a+b))
is represented as a list of calls, not an expression. Now, an expression
could have been just a list of calls (it works in LISP), but in fact it
isn't.


The problem in writing the R language definition is in trying to be both
precise and helpful (the paragraph you quoted is arguably neither, but
that's why it's a `draft').

The precise difference between an expression and a call is that an
expression is of mode "expression" and a call is of mode "call" (and a
list of calls is of mode "list"). This isn't very helpful, which is why
you get the handwaving about an expression being like a list of calls.


	-thomas