Is anyone else concerned with the way in which the R function parser
relocates comments that occur after condional expressions in functions to
before, i.e.
fred <- function(x) {
# wonder what x is like
if (x>0) stop("Sorry non-positive x only")
# that showed x big-time!
x
}
but then fred is parsed and stored as
"fred" <-
function (x)
{
# wonder what x is like
# that showed x big-time!
if (x > 0)
stop("Sorry non-positive x only")
x
}
It turns out that my programming style often includes comments after
conditionals, and I find this re-location a bit confusing.
Cheers, Jonathan.
Jonathan Rougier Science Laboratories
Department of Mathematical Sciences South Road
University of Durham Durham DH1 3LE
"[B]egin upon the precept ... that the things we see are to be
weighed in the scale with what we know" (Meredith, 1879, The Egoist)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._