[BioC] sorting a list of probe ID's according to length of vectors
Cei Abreu-Goodger
cei at ebi.ac.uk
Fri Jan 22 12:51:08 CET 2010
something like this should work...
probeSetList <- probeSetList[order(unlist(lapply(probeSetList, length)))]
Assa Yeroslaviz wrote:
> Hello everybody,
>
> I have a list of over 9000 EntrezID . each lines contains one or probe-IDs
> as here:
>
>> head(probeSetList)
> $`10`
> [1] "38912_at"
>
> $`100`
> [1] "41654_at" "907_at"
>
> $`1000`
> [1] "2053_at" "2054_g_at"
>
> $`10000`
> [1] "40781_at"
>
> $`10001`
> [1] "35430_at" "35431_g_at" "35432_at"
>
> $`10002`
> [1] "31366_at" "31667_r_at"
>
>
> I would like to sort this list according to the length of the single vectors
> inside it. so to sayat the top are the ENTREZIDs with the largest number of
> probe IDs. (in my example $`10001` with 3, but I have some with more!).
>
> I tried with order and sort command, but that didn't work.
>
> I will be happy to hear some advices on how to do it.
>
> THX in advance
>
> Assa
More information about the Bioconductor
mailing list