[R] Another R syntax question

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Sep 3 16:31:33 CEST 2003


Thomas Lumley <tlumley at u.washington.edu> writes:

> I think it's clear that it will parse as either
> (x==y) != z
> or
> x == (y!=z)
> but not which.

The rule is that everything is left associative except assignment and
exponentiation (and IF, for some reason). If in doubt, just remember
that it is the opposite of assignment and that (x <- y) <- z doesn't
make sense... Of course, using parentheses is more expedient.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list