Re: split nukes names() (PR#371)

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: split nukes names() (PR#371)
From: Kurt Hornik (Kurt.Hornik@ci.tuwien.ac.at)
Date: Fri 10 Dec 1999 - 19:00:37 EST


Message-ID: <14416.49461.358324.333146@fangorn.ci.tuwien.ac.at>

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


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:11 EST