Skip to content
Back to formatted view

Raw Message

Message-ID: <47D84A13.80800@gmail.com>
Date: 2008-03-12T21:24:35Z
From: Mark Kimpel
Subject: subset list based on logical within element flag

I have a very long list that I'd like to subset based on a logical value 
within each element. Example below. I'd like to get just those list 
elements for further study whose $sig.cor slot is TRUE. In this example, 
I'd only want element [[2]].

Should be simple, I know. How can I do this? Thanks, Mark

 > gene.pair.tf.lst
[[1]]
[[1]]$gene.pair
[1] "Lgals1:Pxmp2"

[[1]]$sig.cor
[1] FALSE


[[2]]
[[2]]$gene.pair
[1] "Lgals1:Pxmp2"

[[2]]$sig.cor
[1] TRUE


[[3]]
[[3]]$gene.pair
[1] "Lgals1:Pxmp2"

[[3]]$sig.cor
[1] FALSE
-- 

Mark W. Kimpel MD  ** Neuroinformatics ** Dept. of Psychiatry
Indiana University School of Medicine

15032 Hunter Court, Westfield, IN  46074

(317) 490-5129 Work, & Mobile & VoiceMail
(317) 204-4202 Home (no voice mail please)

mwkimpel<at>gmail<dot>com