[BioC] help with matrix

Alberto Goldoni alberto.goldoni1975 at gmail.com
Wed Feb 17 16:23:32 CET 2010


Dear All,
if i have a dataframe "b" like this one:
                       SHR1             SHR2         SHR3          WK1
         WK2
1368290_at        7.680187      7.214491    7.156308    7.064027     4.496945
1368637_at       11.393928     11.337781   11.420565   11.464711     9.329639
1369202_at        7.766468      7.910206    7.553126    7.559352     4.169429
1370463_x_at      8.896523      8.865356    8.847850    8.830867     6.388185
1370806_at        9.754578      9.752164    9.718223    9.680127    11.756575
1370815_at        5.781366      5.799394    5.815935    5.847172     4.318191
1371033_at        5.063421      4.303661    4.598223    4.506666     8.297466
1371137_at        8.010640      7.737443    7.625425    7.629711     4.105173
1371960_at        7.293301      7.149758    6.960322    7.075571     9.944016
1372120_at        6.300269      6.252419    6.296085    6.219186     4.747452

and i would like to obtain another dataframe like this:

   GeneID     SHR1      SHR2   SHR3          WK1          WK2
1     374  5.068725  4.833424  5.251337  9.105219  9.384213
2    2289  7.764840  7.842467  7.973488 11.285194 11.189364
3   10563  4.824265  4.780033  4.417243  8.362088  7.825695
4     687  4.607949  5.169052  4.947950  7.463272  7.370329
5   80149  7.729777  7.472989  7.617576 10.281806  9.541200
6    5033  9.111025  8.239996  8.677078 11.213525 10.343982
7    7088  5.782532  6.094321  6.069819  8.451878  8.442783
8   64764  9.669172  9.684598  9.922658 11.298087 11.198835
9   10628 10.555573 10.461917 11.067293 12.686023 12.624490
10   5087  8.535518  8.652258  8.576578 10.263172  9.893716

so the questions are:
1) how can i get the first colon (1,2,3......10)
2) how can i substitute the affyID with the GeneID
3) how can assembly the 1) and 2) columns in the first dataframe in
order to obtain the second one.

best regards



-- 
-----------------------------------------------------
Dr. Alberto Goldoni
Bologna, Italy



More information about the Bioconductor mailing list