I am trying to export stock prices from R to a spreadsheet. Everything is exporting OK except for the date. These are the commands I am using.
Edit: Just to confirm the date is not been exported at all.
library(quantmod)
library(dataframes2xls)
getSymbols("GOOG", from = "2010-01-01", to = "2012-06-30")
write.xls(GOOG, "C:/goog.xls")
You just need to include row.names=TRUE
in your write.xls
call
write.xls(GOOG, "C:/goog.xls", row.names=TRUE)