[R] I don't understand this
tlumley at u.washington.edu
Tue Sep 2 20:27:00 CEST 2003
On Tue, 2 Sep 2003, Simon Fear wrote:
> Please choose answer:
> a) you beat me to it making a great point
> b) it's got two too many pairs of braces in it, that's whats wrong with
> But seriously, I am sure Richard O'K had no intention of doing any such
> The question was just about the syntax of R, no?
> Isn't it the case that
> is incorrect syntax under any circumstances?
It's *usually* incorrect, but not always
power<-function(lambda) function(x) x^lambda
is perfectly valid.
You could also define, say, %*% to be a composition operator on some group
of functions and write
(f %*% g)(x)
It may be the case that (expr)(expr)<- is always invalid.
More information about the R-help