How do you write CSV in R with matrix names (dimnames (M)) intact in R?

Is there a command in R that will allow you to write a CSV file with the matrix row and column names (dimnames (M))? Whenever I output the file, the names disappear.



does not mention that it is possible.


source to share

3 answers

Use write.csv



Use write.table (..., row.names = TRUE, col.names = TRUE, sep = ",")



Note that there is a complete guide out there dealing with such issues, it really doesn't hurt to look at it from time to time.



All Articles