Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将股票价格从 R 导出到电子表格。除日期外,一切都正常导出。这些是我正在使用的命令。
编辑:只是为了确认日期没有被导出。
library(quantmod) library(dataframes2xls) getSymbols("GOOG", from = "2010-01-01", to = "2012-06-30") write.xls(GOOG, "C:/goog.xls")
你只需要row.names=TRUE在你的write.xls电话中加入
row.names=TRUE
write.xls
write.xls(GOOG, "C:/goog.xls", row.names=TRUE)