Re: [R] function call

From: <vincent_at_7d4.com>
Date: Tue 20 Jun 2006 - 00:30:54 EST

Gabor Grothendieck a écrit :

> Perhaps you what you want to do is to return an object
> that has a print method like this:
> f1 <- function(x) structure(c(x, x^2), class = "f1")
> print.f1 <- function(x) cat("x is", x[1], "x squared is", x[2], "\n")

Thank you Gabor for this idea.
For the moment interactive() seems enough for my need, but I'll keep also this way in mind.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jun 20 02:24:22 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 20 Jun 2006 - 06:12:15 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.