Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个我通过的矩阵
l = cutree (clus, k = 1:j)
看起来像:
bs 1 1 1 1 2 x 1 1 2 2 3 v 1 1 2 2 3 e 1 1 2 2 3 nn 1 1 1 3 4 j 1 2 3 4 5
现在,我想将 l 写入文件,使用:
write(l, file = "datia", ncolumns = 6)
但是,只有数字被传送到文件,而不是标签。
我怎样才能改变这个?
输出是表格形式吗?您应该能够使用:
write.table(l, file = "datia", col.names = T, row.names = T)