【问题标题】:Sorting time series descending对时间序列进行降序排序
【发布时间】:2020-03-25 17:42:50
【问题描述】:

我正在尝试使用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

【问题讨论】:

    标签: r options bloomberg rblpapi


    【解决方案1】:

    我现在不在终端机前,但我认为 sort 不是 bdh 的有效选项。我会将结果分配给一个变量并对其进行排序。目前无法检查,但类似:

    库(dplyr)

    库(Rblpapi)

    bplConnect()

    x

    x %>% 排列(desc(FUND_TOTAL_ASSETS))

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-18
      • 2018-05-21
      • 2022-01-06
      相关资源
      最近更新 更多