split nukes names() (PR#371)

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Fri, 10 Dec 1999 10:00:37 +0100 (CET)


>>>>> cberry  writes:

>> split(c(a=1,b=2),c(1,2))
> $"1"
> [1] 1

> $"2"
> [1] 2

> The documentation does not *promise* that names will survive, but in
> Splus3.4, they do. This broke a function that worked under S+ that
> used the names attribute of elements in the components returned by
> split.

I don't think that names in x should be preserved here.  The names of
the returned list are obtained from the levels of the split factor f
(which, in your case, are "1" and "2").

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