[S] 2. summary etc

Christian Hoffmann (christian.hoffmann@wsl.ch)
Thu, 25 Jun 1998 15:00:52 +0200


Dear all,

It is easier than I thought:

I generated a manova object "man" and called "summary(man)" from the top
level, which worked, of course.
Inside my function
"p" <- function(mobj){
# I will have to be more explicit and say
print(summary(mobj)) # which means "print.summary.manova(summary(mobj))"
}
p(man) # to use the function.

To the initiated this may seem trivial, but in the help files there might
be a due reference to this circumlocution.

----------------------------------------
Frequently I want to call a print.summary.* function from a wrapping
function of my own. This often leads to trouble, because from within this
wrapping function the print.summary.* will not *see* the information it
needs. Calling print.summary from the uppermost level is no problem (of
course :-) ).

Question:
Is there a commonly agreed to way to program such functions that they will
work under all circumstances?

Otherwise I would call them "top-level-functions-only", and not true
functions. The trouble is that there is no easy way to these two kind apart.

PS: How about R in this respect?

Kind regards
--Christian

Christian W. Hoffmann
Swiss Federal Institute for Forest, Snow and Landscape Research
CH-8903 Birmensdorf, Switzerland
phone: ++41-1-739 22 77 fax : ++41-1-739 22 15 e-mail: hoffmann@wsl.ch
WWW: http://www.wsl.ch/wsidb/leute/cho/choHPENG.html
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news