R-beta: Bug or feature?

Bill Venables (wvenable@attunga.stats.adelaide.edu.au)
Sun, 17 Aug 1997 17:59:58 +0930


Date: Sun, 17 Aug 1997 17:59:58 +0930
Message-Id: <9708170829.AA15344@attunga.stats.adelaide.edu.au>
From: Bill Venables <wvenable@attunga.stats.adelaide.edu.au>
To: r-help@stat.math.ethz.ch
Subject: R-beta: Bug or feature?

Here is a difference between R-0.50-a3 and S that surprised me

> x
 [1]  1  2  3  4  5  6  7  8  9 10

> f1
function (x, nam = deparse(substitute(x))) 
{
        x <- x
        nam
}

> f2
function (x, nam = deparse(substitute(x))) 
{
        nam <- nam
        x <- x
        nam
}

> f2(x)
[1] "x"

> f1(x)
[1] "c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"

-- 
Bill Venables, Head, Dept of Statistics,    Tel.: +61 8 8303 5418
University of Adelaide,                     Fax.: +61 8 8303 3696
South AUSTRALIA.     5005.   Email: Bill.Venables@adelaide.edu.au
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help 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-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=