我正在尝试使用quantmod函数getFin下载公司财务报表。
以下是quantmod文档中的相关部分:
但是,当我运行相同的命令时,我得到一条错误消息:
getFin('AAPL') # or getFinancials('AAPL')
Error in thead[x]:thead[x + 1]: NA/NaN argument
Traceback:
1. getFin("AAPL")
2. lapply(seq(1, 11, 2), function(x) Symbol[thead[x]:thead[x + 1]])
3. FUN(X[[i]], ...)
在使用包finreportr时,我也收到一条错误消息:
library(finreportr)
GetIncome('FB', 2015)
Error in mutate_impl(.data, dots): Evaluation error: `as_dictionary()` is defunct as of rlang 0.3.0.
Please use `as_data_pronoun()` instead.
Traceback:
1. GetIncome("FB", 2015)
2. GetFinancial(income.descriptions, symbol, year)
3. GetURL(symbol, year)
4. GetAccessionNo(symbol, year, foreign = FALSE)
5. mutate(reports.df, filing.year = substr(reports.df$filing.date,
. 1, 4)) %>% filter(filing.year == year.char) %>% filter(filing.name ==
. "10-K" | filing.name == "20-F")
6. eval(lhs, parent, parent)
7. eval(lhs, parent, parent)
8. mutate(reports.df, filing.year = substr(reports.df$filing.date,
. 1, 4))
9. mutate.data.frame(reports.df, filing.year = substr(reports.df$filing.date,
. 1, 4))
10. as.data.frame(mutate(tbl_df(.data), ...))
11. mutate(tbl_df(.data), ...)
12. mutate.tbl_df(tbl_df(.data), ...)
13. mutate_impl(.data, dots)
发布于 2019-09-22 08:19:32
getFin
函数不再起作用。请参阅quantmod版本0.4-15
getFin("AAPL")
Error: ‘getFinancials.google’ is defunct.
Google Finance stopped providing data in March, 2018.
You could try some of the data sources via Quandl instead.
See help("Defunct") and help("quantmod-defunct")
可以使用finreportr之类的包,也可以使用其他尝试读取edgar数据的包。
https://stackoverflow.com/questions/58046835
复制相似问题