Subject: Re: cbind is not generic as claimed, omits labels where S has them (PR#240)
Date: Fri 06 Aug 1999 - 02:17:14 EST
On 5 Aug 1999, Peter Dalgaard BSA wrote:
> (1) The docs are clearly wrong (or perhaps rather, wishful thinking)
Sorry, but always the docs are right and the implementation wrong.
That's an axiom of professional computer programming (so I am told
by several ex-professional computer programmers.)
> (2) Cbind should be generic as in Splus
> (3) For the labels, one needs essentially to implement deparse.level
> or face the horrors of
Really? Or try a bit less hard? Getting the common cases right is not
too hard -- ts.union etc seem normally to be about right, and they have
> (4) The dataframe special casing seems to be an evasion. The sticky
> bit is that one needs to dispatch on *any* argument. For Splus (3.4)
> compatibility, one has to check each argument for its class
> method, and if all arguments agree - in the sense that all the
> arguments that have class methods must have the same one, dispatch
> to that method. If they disagree, print error message and try
> default method.
> Whoever wrote the code seems to have decided that things would be
> easier if one assumed that the only method for cbind was
> Note that by the above logic, if you make a cbind.ts, you can't
> cbind a time series to a data frame!
That's OK, as I can coerce a data frame to a ts, but in general I want to
cbind ts objects with non-trivial time bases.
I don't think documenting what we have is a good way out here....
-- Brian D. Ripley, email@example.com Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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: firstname.lastname@example.org _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:06 EST