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.

help(write)

      

does not mention that it is possible.

+2


source to share


3 answers


Use write.csv



+7


source


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



+1


source


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.

+1


source







All Articles