Re: [R] about list

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Tue 14 Feb 2006 - 21:03:27 EST

XinMeng wrote:

> 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:

For example for a List L:

   list(L[1:2], L[3:4])

Uwe Ligges

> 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
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 14 21:08:17 2006

This archive was generated by hypermail 2.1.8 : Wed 15 Feb 2006 - 13:38:55 EST