From cgenolin at u-paris10.fr  Fri Oct 24 23:15:11 2008
From: cgenolin at u-paris10.fr (Christophe Genolini)
Date: Fri, 24 Oct 2008 23:15:11 +0200
Subject: [Rd] unlist change the ordered type
Message-ID: <49023ADF.2070003@u-paris10.fr>

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



[Rd] unlist change the ordered type
Christophe Genolini