我试图以降序方式打印以下公式,其中包括 BDH
但 "排序 "似乎不能正常工作。
library(Rblpapi)
con <- blpConnect()
opt <- c("sort" = "D")
bdh("MLISMBC LX Equity", c("FUND_TOTAL_ASSETS"), start.date="2020-01-01",
end.date = "2020-03-02", options = opt)
Error in bdh_Impl(con, securities, fields, start.date, end.date, options, :Sub-element '(null)' does not exist
我现在不在终端机前,但我不认为。捃 是bdh的一个有效选项。我会将结果分配给一个变量,然后进行排序。 现在不能检查这个,但类似于这样。
library(dplyr)
库(Rblpapi)
bplConnect()
x <- bdh("MLISMBC LX Equity", c("FUND_TOTAL_ASSETS"), start.date="2020-01-01", end.date="2020-03-02")
x %>% arrange(desc(FUND_TOTAL_ASSETS))