Suppose I have x
like this
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
rs1952251 12.05886 23.72529 30.92366 37.53577 43.64377 46.75088 48.93301
rs3009943 11.90153 22.70790 30.29965 32.53084 34.70415 36.29477 37.77274
I would like to extract first row and make that as a 1 by 7 matrix. I use x[1,]
. But I got
> x[1,]
[1] 12.05886 23.72529 30.92366 37.53577 43.64377 46.75088 48.93301
It is a vector and it does not have rownames. I would like to get something as following:
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
rs1952251 12.05886 23.72529 30.92366 37.53577 43.64377 46.75088 48.93301