R从矩阵中恢复一行

时间:2014-07-11 16:14:26

标签: r matrix row

我在 R

中有以下矩阵
> head(k)
row.names        SRX003922 SRX001291 SRX001364 SRX001365
ENSG00000000003 12.1999909  1.982836  0.000000  1.335383
ENSG00000000005 47.8615027  0.000000  0.000000  0.000000
ENSG00000000419  0.9384608 11.897018  4.735838  3.338457
ENSG00000000457 13.1384517 23.794037 16.575434 16.024595
ENSG00000000460  0.0000000  0.000000  0.000000  0.000000
ENSG00000000938 10.3230692  0.000000  0.000000  0.000000
                 SRX001366 SRX001367 SRX001368 SRX003931
ENSG00000000003  0.0000000  1.220217  0.000000  5.641656
ENSG00000000005  0.0000000  0.000000  0.000000  1.880552
ENSG00000000419 10.5627363  6.711194  7.510932  5.014805
ENSG00000000457 21.1254727 15.862822 18.151419  7.522207
ENSG00000000460  0.0000000  3.050543  0.625911  0.000000
ENSG00000000938  0.7041824  0.000000  0.000000  1.253701

我想知道如何通过给出row.names值从这个矩阵中恢复整行?

0 个答案:

没有答案