[EMAIL PROTECTED] wrote:
> Dear R Users,
>
> A bit of a simple question, but I could not find the answer thru google 
> ("sorting lists r cran","how can i sort a list  r cran") or RSiteSearch... 
> how can I sort a list ?
>
> One imagines something like sort.list would do the job, but that's not the 
> one.
>
>   
>> foo<-list(a=10,b=2,c=3)
>> sort.list(foo)
>>     
> Error in sort.list(foo) : 'x' must be atomic for 'sort.list'
> Have you called 'sort' on a list?
>
> Is  there existing functionality which can sort a list ?
>
> Thanks in advance,
> Tolga
>   
Sort it by what?

I.e. what should it do with list(a=3, b=c(2,4))?

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])              FAX: (+45) 35327907

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to