From Kurt.Hornik@ci.tuwien.ac.at  Fri Dec 10 09:00:37 1999
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Fri, 10 Dec 1999 10:00:37 +0100 (CET)
Subject: split nukes names() (PR#371)
In-Reply-To: <199912100002.BAA07873@pubhealth.ku.dk>
References: <199912100002.BAA07873@pubhealth.ku.dk>
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


split nukes names() (PR#371)
Kurt Hornik