[Rd] unlist change the ordered type

From: Christophe Genolini <cgenolin_at_u-paris10.fr>
Date: Fri, 24 Oct 2008 23:15:11 +0200


Hi the list,

unlist respect the all the atomic type except orderd (it change of ordered into factor) :

### integer
class(unlist(list(1:5,1:3)))
#[1] "integer"

### numeric
class(unlist(list(1.2,3.5)))
#[1] "numeric"

### character
class(unlist(list("e","e")))
#[1] "character"

### factor
class(unlist(list(factor("e"),factor("e"))))
#[1] "factor"

### ordered
class(unlist(list(ordered("e"),ordered("e"))))
#[1] "factor"

Christophe



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 24 Oct 2008 - 21:22:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 25 Oct 2008 - 10:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive