From thomas@biostat.washington.edu  Tue Jan  6 17:55:38 1998
From: thomas@biostat.washington.edu (Thomas Lumley)
Date: Tue, 6 Jan 1998 09:55:38 -0800 (PST)
Subject: split(.) woes + "very cheap" fix
In-Reply-To: <199801061742.SAA03394@sophie.ethz.ch>
Message-ID: <Pine.SUN.3.95.980106095351.5275C-100000@chekov>

On Tue, 6 Jan 1998, Martin Maechler wrote:

> 
> A very silly workaround (which I am  NOT committing to the sources) 
> which seems to help is
> 
>   split.default <- function(x,f) {
> 	  if(is.factor(x)) x <- codes(x)
> 	  .Internal(split(x,as.factor(f)))
>   }
> 

It looks as though what we really need to do is to remove and then restore
some of the attributes of x.  The question is, which ones? Factor levels
do want to be restored, but other things like dimension don't.

	-thomas

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


split(.) woes + "very cheap" fix
Thomas Lumley