[R] selection from a list
Weiwei Shi
helprhelp at gmail.com
Thu Oct 19 23:16:23 CEST 2006
hi,
i have a list which looks like this:
$ :List of 3
..$ network: chr "xenobiotic_metabolism_1"
..$ error : num 0.134
..$ table : int [1:2, 1:2] 5 15 4 118
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:2] "0" "1"
.. .. ..$ : chr [1:2] "0" "1"
.. ..- attr(*, "class")= chr "table"
$ :List of 3
..$ network: chr "dd_inflammation_r_genes"
..$ error : num 0.0775
..$ table : int [1:2, 1:2] 8 10 1 123
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:2] "0" "1"
.. .. ..$ : chr [1:2] "0" "1"
.. ..- attr(*, "class")= chr "table"
$ :List of 3
..$ network: chr "ng_protein_folding_short_genes"
..$ error : num 0.239
..$ table : int [1:2, 1:2] 6 31 3 102
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:2] "0" "1"
.. .. ..$ : chr [1:2] "0" "1"
.. ..- attr(*, "class")= chr "table"
I am wondering how to select the component whose $error is, say, less than 0.1?
I can do unlist and transform it into a data.frame to do selection,
but I just want to learn if there is a way to do the list selection.
thanks,
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
More information about the R-help
mailing list