[R] about list

XinMeng xmeng at capitalbio.com
Tue Feb 14 10:41:55 CET 2006


Hello sir:
A question about the usage of list:

The data of a list:

[[1]]
      genename  comp      diff       lwr       upr        p.adj
g2-g1  NewU1-R g2-g1 -242.6667 -337.9602 -147.3732 1.754308e-04
g3-g1  NewU1-R g3-g1 -266.6667 -361.9602 -171.3732 8.869357e-05
g4-g1  NewU1-R g4-g1  440.6667  345.3732  535.9602 2.055929e-06

[[2]]
      genename  comp      diff       lwr        upr        p.adj
g2-g1  NewU1-R g2-g1 -242.6667 -337.9602 -147.37315 1.754308e-04
g3-g2  NewU1-R g3-g2  -24.0000 -119.2935   71.29352 8.497181e-01
g4-g2  NewU1-R g4-g2  683.3333  588.0398  778.62685 4.785440e-08

[[3]]
      genename  comp      diff       lwr        upr        p.adj
g3-g1  NewU2-R g3-g1 -266.6667 -361.9602 -171.37315 8.869357e-05
g3-g2  NewU2-R g3-g2  -24.0000 -119.2935   71.29352 8.497181e-01
g4-g3  NewU2-R g4-g3  707.3333  612.0398  802.62685 3.713499e-08

[[4]]
      genename  comp     diff      lwr      upr        p.adj
g4-g1  NewU2-R g4-g1 440.6667 345.3732 535.9602 2.055929e-06
g4-g2  NewU2-R g4-g2 683.3333 588.0398 778.6268 4.785440e-08
g4-g3  NewU2-R g4-g3 707.3333 612.0398 802.6268 3.713499e-08


Actually, [[1]] and [[2]] are from the same group, [[3]] and [[4]] are from the same group.
And how can I arrange [[1]] [[2]] together(the same as [[3]] and [[4]])?
In other words,the result I want is:

group1
      genename  comp      diff       lwr       upr        p.adj
g2-g1  NewU1-R g2-g1 -242.6667 -337.9602 -147.3732 1.754308e-04
g3-g1  NewU1-R g3-g1 -266.6667 -361.9602 -171.3732 8.869357e-05
g4-g1  NewU1-R g4-g1  440.6667  345.3732  535.9602 2.055929e-06


group1
      genename  comp      diff       lwr        upr        p.adj
g2-g1  NewU1-R g2-g1 -242.6667 -337.9602 -147.37315 1.754308e-04
g3-g2  NewU1-R g3-g2  -24.0000 -119.2935   71.29352 8.497181e-01
g4-g2  NewU1-R g4-g2  683.3333  588.0398  778.62685 4.785440e-08


group2
      genename  comp      diff       lwr        upr        p.adj
g3-g1  NewU2-R g3-g1 -266.6667 -361.9602 -171.37315 8.869357e-05
g3-g2  NewU2-R g3-g2  -24.0000 -119.2935   71.29352 8.497181e-01
g4-g3  NewU2-R g4-g3  707.3333  612.0398  802.62685 3.713499e-08


group2
      genename  comp     diff      lwr      upr        p.adj
g4-g1  NewU2-R g4-g1 440.6667 345.3732 535.9602 2.055929e-06
g4-g2  NewU2-R g4-g2 683.3333 588.0398 778.6268 4.785440e-08
g4-g3  NewU2-R g4-g3 707.3333 612.0398 802.6268 3.713499e-08

Thanks!  

My best




More information about the R-help mailing list