From p.dalgaard@biostat.ku.dk  Thu Aug  5 23:08:05 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 06 Aug 1999 00:08:05 +0200
Subject: cbind is not generic as claimed, omits labels where S has them (PR#239)
In-Reply-To: Ross Ihaka's message of "Fri, 6 Aug 1999 09:53:12 +1200"
References: <199908051128.NAA28801@pubhealth.ku.dk> <19990806095312.A15303@stat1.stat.auckland.ac.nz>
Message-ID: <x2lnbp7uey.fsf@blueberry.kubism.ku.dk>

Ross Ihaka <ihaka@stat.auckland.ac.nz> writes:

> I can see what the problem is - we don't have the generic dispatch
> mechanism in place.  I will add it.
> 
> I think that the special casing of data frames is needed because this
> appears to be the (undocumented) S behaviour.  A data frame anywhere in
> the argument list causes the result to be a data frame.

I played around with this earlier today. There's nothing special about
dataframes, S does the same with any classed object. I.e.

class(b)<-"my"
cbind.my<-function(...)match.call()

cbind(a,b)

will dispatch cbind.my

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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)
Peter Dalgaard BSA