Reputation: 329
I am playing around with the Rblpapi package, but am not having any joy setting the periodicity of the downloaded data
opt <- c("periodictySelection" = "WEEKLY")
SPX <- bdh("SPX Index","PX_Last", start.date=Sys.Date()-30, include.non.trading.days = FALSE, options=opt
i also tried:
opt <- c("per" = "cw")
as per the excel api
However, I keep getting an error: Error: Sub-element '(null)' does not exist.
I cant see any tips in the help files.
Upvotes: 1
Views: 1111
Reputation: 91
It seems to be a simple spelling mistake in the original post: opt <- c("periodictySelection" = "WEEKLY")
has periodicitySelection
misspelled.
Upvotes: 1