[Rd] argument names in generic print functions (PR#955)
Richard.Beare@cmis.csiro.au
Richard.Beare@cmis.csiro.au
Tue, 29 May 2001 01:49:32 +0200 (MET DST)
Hello,
I think this is a bug, although it is possible that I'm doind something
silly.
I want to be able to determine the argument name for variables passed to
a generic print function
suppose we have
print.foo <- function(x, ...)
{
nm<-deparse(substitute(x))
cat("param name is ", nm, "\n")
}
d<-structure(1, class="foo")
Under R-1.2.[2,3]
> print(d)
param name is d
> d
param name is structure(1, class = "foo")
Under Splus 3.4 the responses are
> d<-structure(1, class="foo")
> d
param name is d
> print(d)
param name is d
If I'm going about this the wrong way then please let me know.
Thanks
--
Richard Beare, CSIRO Mathematical & Information Sciences
Locked Bag 17, North Ryde, NSW 1670, Australia
Phone: +61-2-93253221 (GMT+~10hrs) Fax: +61-2-93253200
Richard.Beare@cmis.csiro.au
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._