From ihaka@stat.auckland.ac.nz  Fri Aug  6 22:12:42 1999
From: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Sat, 7 Aug 1999 09:12:42 +1200
Subject: cbind is not generic as claimed, omits labels where S has them (PR#239)
In-Reply-To: <x2u2qd8ie8.fsf@blueberry.kubism.ku.dk>; from Peter Dalgaard BSA on Fri, Aug 06, 1999 at 09:42:23AM +0200
References: <199908051128.NAA28801@pubhealth.ku.dk> <19990806095312.A15303@stat1.stat.auckland.ac.nz> <x2lnbp7uey.fsf@blueberry.kubism.ku.dk> <19990806145534.A3584@stat1.stat.auckland.ac.nz> <x2u2qd8ie8.fsf@blueberry.kubism.ku.dk>
Message-ID: <19990807091242.A15242@stat1.stat.auckland.ac.nz>

Ok, I have made some changes to cbind/rbind which will support dispatch
to other methods.  As part of this I have changed things so that the
values passed on are packaged up as (evaluated) promises so that any
closure they invoke will be able to use substitute to get text values
to use as labels.  What I need is a clear idea of the rules for doing
the dispatch.  The picture I have at present is:

	dispatch.class <- "default"
	for (arg in arg.list) {
		if (arg is an object) {
			arg.class <- class(arg)[1]
			if (there is a method for arg.class) {
				if (dispatch.class == "default")
					class <- arg.class
				else if (args.class != dispatch.class)
					drop through to dispatch
			}
		}
	}
    dispatch:
	if (dispatch.class != "default")
		dispatch to appropriate closure
	else
		carry out default actions

This also looks like it sufficiently generic that it could be packaged
as a useful function along the lines of "DespatchOrEval" -- perhaps
MultiDespatchOrEval.

Does this sound right?

	Ross
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


cbind is not generic as claimed, omits labels where S has them (PR#239)
Ross Ihaka