I first made a matrix which looks like
1 2 3 4 5
11050 123 121 110 182 199
dist 0.1 0.2 0.5 0.61 0.78
11051 121 122 155 198 192
dist 0.1 0.3 0.44 0.55 0.88
11052 128 199 125 122 134
dist 0.12 0.2 0.4 0.5 0.56
using rbind method, accumulating 6 vectors by row. where the row names of this matrix are [11050, dist, ..., 11052, dist]
I extracted this matrix into a csv file with write.table function, and I now tried read that file into R space back which didn't work. An error occurred that row names can't have duplicate values, which made me go crazy... how can I exactly reshape the matrix by reading the csv file?
I read what someone linked as the duplicate question of mine, but row.names=NULL doesn't seem to solve the matter. A new column indicating row names 1 to 6 automatically appears, but I still can read my csv file without row.names=NULL.
I tried some more ways and figured out that matrix is possible to have duplicate of row names. So I'd rather change the data into a matrix first and then change its row names.