[R] Problem with parser and if/else

James MacDonald jmacdon at med.umich.edu
Fri Nov 14 15:28:52 CET 2003


> I'm trying to grasp this: if you're saying (or are you saying) that
the 
> only way to have if() know that an else will be present is to put it
on the 
> same line as the closing curly brace of the if() (compound)
statement. But 
> if I look at some code from, e.g., aov and lm, I see plenty
violations of 
> that rule.

There are no violations to that rule in either lm or aov. It simply
looks that way if you type lm or aov from within R. If you looked at the
functions themselves using an editor, you would see that they all
conform to 

if{
...
}else{
...
}

> regards,
> Paul


Jim



James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623




More information about the R-help mailing list