Re: [R] function call

From: <>
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. mailing list PLEASE do read the posting guide! 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 Please read the posting guide before posting to the list.