I'm trying to get dividend information from the web and save it to a .csv file. My code is:
library(quantmod)
stokname = 'XOM'
divseries = getDividends(stokname)
write.csv(divseries, file = paste("C:/DATA/dividends/",stokname,".csv", sep = ""), row.names=FALSE)
this works, but when I save it, all I have is the dividends, without the dates. How can I write the dates to the file?