I am trying to save a matrix that I have in R as a text file that is tab-delimited with the row and column names included and properly aligned.
I have tried this:
write.table(data, "mytable.txt", sep="\t", col.names=TRUE)
But when I open the file it is a jumbled up mess. I assume it has something to do with my row or column names not being specified, but I am unsure.