write.table
write.table writes unwanted leading empty column to header when has rownames
Citing ?write.table, section CSV files: By default there is no column name for a column of row names. If col.names = NA and row.names = TRUE a blank column name is added, which is the convention used for CSV files to be read by spreadsheets. So you must do write.table(a, ‘a.txt’, col.names=NA) and you get … Read more