Whoa.
Don't let my valuable suggestion get lost.
I want "} else {". Yihue wants "} else {". And I have not heard anybody
say they prefer the other way, unless you interpret Duncan's comment
"that's nonsense" as a blanket defense of the status quo. But I don't think
he meant that. This is a matter of style consistency and avoidance of new
R-user confusion and error.
After reading the help for "if", I don't see how anybody can argue against
this. Good R code has this style:
} else {
and not
}
else
because the latter fails if it is run line-by-line. While trying to teach
people how to write R programs, it would be nice if the output of
print.function was consistent with the good way, the way that is actually
practiced in the R source code itself. This is a major source of new
programmer confusion. Its very tough to explain and teach.
pj
--
Paul E. Johnson
Professor, Political Science Assoc. Director
1541 Lilac Lane, Room 504 Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org http://quant.ku.edu
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel