Giter VIP home page Giter VIP logo

Comments (6)

eddelbuettel avatar eddelbuettel commented on July 26, 2024

I am not sure. I think I'd want to double check with other API clients and their defaults.

from rblpapi.

joel23888 avatar joel23888 commented on July 26, 2024

Correct me if I'm wrong but doesn't the use of getOption with a default of NULL allow each user to specify their own preferred set of options?

The other concern I can see is if returnAs were put into an options vector then this may break code that relied on the current returnAs option.

from rblpapi.

eddelbuettel avatar eddelbuettel commented on July 26, 2024

If you override a default of NULL with your value ... you get your value? What am I missing?

from rblpapi.

joel23888 avatar joel23888 commented on July 26, 2024

The preferred setting in getBarsOptions in a particular project could differ from the default. I am trying to:

  • Use getOption to keep preferred options for a project for getBars across different calls, but still be able to override these by passing a vector of options on a particular call
  • Have a default if getBarsOptions is not specified. This could be NULL or it could be something else like c("gapFillInitialBar"="TRUE", "adjustmentFollowDPDF"="TRUE"). I think following DPDF seems to make sense (and may be safer) as a default because that is what the user has set on their terminal. If the default is NULL then the data returned would not be adjusted for corporate actions irrespective of the DPDF settings. Filling the initial bar is not a necessity for a default

from rblpapi.

eddelbuettel avatar eddelbuettel commented on July 26, 2024

We could do that, but I don't want to put an infinity of values into options().

As an alternative can you not simply define alternate (local) wrappers:

getBars1 <- function(...) {
   getBars(..., options=c("gapFillInitialBar"="TRUE","adjustmentFollowDPDF"="TRUE"))
}

etc possibly setting the option values as function arguments there too?

from rblpapi.

joel23888 avatar joel23888 commented on July 26, 2024

Yes, that is also fine. Will close this.

from rblpapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.