我试图从雅虎金融下载每日股票数据,通过Quantmod软件包在R。我遇到一个错误的消息,说明一个连接无法建立。
install.packages("quantmod")
library(quantmod)
getSymbols.yahoo(Symbols = "SPY")
Error in new.session() : Could not establish session after 5 attempts发布于 2022-07-01 15:47:30
首先,请检查互联网,并检查代理,如果有的话,阻止连接,如@r2evans提到的。
更新QuantMod (使用remotes包),然后重试:
remotes::install_github("joshuaulrich/quantmod@358-getsymbols-new.session")或者(使用remotes或devtools包):
# lightweight
remotes::install_github("joshuaulrich/quantmod")
# or
devtools::install_github("joshuaulrich/quantmod")其中一个应该有效..。
https://stackoverflow.com/questions/72831487
复制相似问题