From Martin Maechler <maechler@stat.math.ethz.ch>  Fri Aug  8 13:56:17 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Fri, 8 Aug 1997 14:56:17 +0200
Subject: R-alpha:  unlist(..) forever..
In-Reply-To: <199708080306.PAA27540@stat1.stat.auckland.ac.nz> (message from
 Ross Ihaka on Fri, 8 Aug 1997 15:06:50 +1200 (NZST))
Message-ID: <199708081256.OAA03801@sophie.ethz.ch>

[[ R-0.50 Alpha-3  --- i.e. both patches applied to 0.50-a1 ]]

There are less problems, but I think two remain

1) Peter Dalgaard's example {which "includes"  Kurt's unlist(lm(..))}

> unlist(list(1,2,x~y))
[[1]]
[1] 1

[[2]]
NULL

[[3]]
NULL


2) [unreported yet:]

l.ex <- list(a = list(1:5, LETTERS[1:5]), b = "Z", c = NA)

unlist(l.ex) #-- now 'okay' in 0.50-a3 !!

unlist(l.ex, recursive=FALSE) #-- --- recursive has no effect!
	     ##-------------   

which returns the same as the default recursive = TRUE

whereas S gives
S> unlist(list(a = list(1:5, LETTERS[1:5]), b = "Z", c = NA), rec = FALSE)
$a1:
[1] 1 2 3 4 5

$a2:
[1] "A" "B" "C" "D" "E"

$b:
[1] "Z"

$c:
[1] NA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: unlist(..) forever..
Martin Maechler