-->

如何从文件中删除rownames(How to remove the rownames from t

2019-07-04 07:53发布

我有一个文件,它看起来像这样..

"Locations" "X9442" "X5997"
"1" "cg00000957"    0.87    0.86
"2" "cg00001349"    0.78    0.78
"3" "cg00001583"    0.06    0.08
"4" "cg00002028"    0.01    0.01

我要删除的行名称,使它看起来像如下:

 "Locations"    "X9442" "X5997"
 "cg00000957"   0.87    0.86
 "cg00001349"   0.78    0.78
 "cg00001583"   0.06    0.08
 "cg00002028"   0.01    0.01

我尝试过各种东西,但我不能同时做write.table删除这些索引。 有时也头“位置”移动其列。 有人可以帮助我走出我如何实现上述的R或Linux呢?

Answer 1:

看帮助文件: ?write.table特别是,

write.table(dd, file="output.csv", row.names=FALSE)


文章来源: How to remove the rownames from the file