E.D.
E.D.

Reputation: 329

RBLPAPI options

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

Answers (2)

Slurp
Slurp

Reputation: 91

It seems to be a simple spelling mistake in the original post: opt <- c("periodictySelection" = "WEEKLY") has periodicitySelection misspelled.

Upvotes: 1

E.D.
E.D.

Reputation: 329

using

opt <- c("periodicitySelection"="WEEKLY")

did the trick

Upvotes: 0

Related Questions