Skip to content
Prev 30299 / 63424 Next

unlist change the ordered type

On Fri, 24 Oct 2008, Christophe Genolini wrote:

            
Consider

 	unlist(list(ordered(1:2),ordered(letters[1:4])))

Since one cannot deduce what ordering should apply, the best that can be 
done is to demote all arguments to factors.

This is the general case. Only in the special case in which all list 
elements are of class 'ordered' and the levels attributes are the same 
would this be sensible.

HTH,

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901