Is this a bug? Certainly it was not expected. dump() seems to prefer a
global definition over a local one. R 1.6.1 on Solaris 8 or NetBSD:
dump("D", "D.q") # a global D() exists
system("cat D.q")
"D" <-
function (expr, name)
.Internal(D(expr, name))
D <- function(x) print(x) # now create a local one
ls()
dump("D", "D.q")
system("cat D.q") # here's the surprise
"D" <-
function (expr, name)
.Internal(D(expr, name))
The same thing happens with dump(list=ls(), "D.q").
Ray Brownrigg
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._