Dear Nikol,
Try this:

do.call(c,lapply(yourlist,function(x) x[2] ))

HTH,

Jorge


On Wed, Mar 4, 2009 at 7:18 AM, Nikol Simecek <ns455@cam.ac.uk> wrote:

> Hello
> I am am new to R and any help with the following would be appreciated:
> I have a list (example attached) and I would like to create a new list
> which is a filtered version of this list. I.e I would like a list that only
> contains elements with this value:
>
> Chr 10 : 21853562 - 21855482
>
> Any pointers/tips would be great.
> Thanks!
> Nikol
>
> --
> Bioinformatician/Computer Associate
> Cambridge Institute for Medical Research
> University of Cambridge
> Wellcome Trust/MRC Building
> Hills Road
> Cambridge
> CB2 0XY
> 01223 762111
>
> [[1]]
> human../US45102804_251757910002_S01_CGH-v4_95_Feb07.chr10.cher1
> Chr 10 : 21853562 - 21855482
> Antibody : ./US45102804_251757910002_S01_CGH-v4_95_Feb07
> Maximum level = 0.5370385
> Score = 3.193875
> Spans 19 probes.
> Defined extras: typeUpstream, typeInside, distMid2TSS, upSymbol, inSymbol,
> type
>
> [[2649]]
> human../US45102804_252058310010_S01_CGH-v4_95_Feb07.chrX.cher18
> Chr X : 72387424 - 72387712
> Antibody : ./US45102804_252058310010_S01_CGH-v4_95_Feb07
> Maximum level = 0.3504706
> Score = 0.4045575
> Spans 4 probes.
> Defined extras: typeUpstream, typeInside, distMid2TSS, upSymbol, inSymbol,
> type
>
> [[2650]]
> human../US45102804_252058310010_S01_CGH-v4_95_Feb07.chrX.cher19
> Chr X : 129037305 - 129037494
> Antibody : ./US45102804_252058310010_S01_CGH-v4_95_Feb07
> Maximum level = 0.4718157
> Score = 0.5751177
> Spans 3 probes.
> Defined extras: typeUpstream, typeInside, distMid2TSS, upSymbol, inSymbol,
> type
>
> [[2651]]
> human../US45102804_252058310010_S01_CGH-v4_95_Feb07.chrX.cher20
> Chr X : 129048386 - 129048865
> Antibody : ./US45102804_252058310010_S01_CGH-v4_95_Feb07
> Maximum level = 0.3711013
> Score = 0.4121159
> Spans 5 probes.
> Defined extras: typeUpstream, typeInside, distMid2TSS, upSymbol, inSymbol,
> type
>
> [[2652]]
> human../US45102804_252058310010_S01_CGH-v4_95_Feb07.chrX.cher21
> Chr X : 129065300 - 129066038
> Antibody : ./US45102804_252058310010_S01_CGH-v4_95_Feb07
> Maximum level = 0.4387153
> Score = 1.515073
> Spans 8 probes.
> Defined extras: typeUpstream, typeInside, distMid2TSS, upSymbol, inSymbol,
> type
>
> ______________________________________________
> R-help@r-project.org 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.
>
>

	[[alternative HTML version deleted]]


