I try to use write.table() to output build-in dataset EuStockMarkets. EuStockMarkets is like this.
However, when I used write.table(EuStockMarkets, ".txt") to output a text file, the dates disappeared.
I want to know how to print the dates with the data as row name?
To display the first picture, just type EuStockMartkets in the console.
write.table(EuStockMarkets, "...\euStockMarkets.txt", sep="\t", na = ".", row.names = TRUE, col.names = TRUE)
And my code is like this.