Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
166 stars 75 forks source link

Minor change to doc of bds - result is a data.frame #320

Closed mtkerbeR closed 3 years ago

mtkerbeR commented 3 years ago

As function bds accepts only one security and one field, the result should always be a single data.frame

johnlaing commented 3 years ago

Apologies, I didn't see this when it came in. The existing doc was copied verbatim from bdh, this is closer to accurate though still not quite precise. I'd propose something along the lines of what we use in bsrch: A data frame object with the requested data set.

Also we'll need to regenerate the man files.

@eddelbuettel that sound OK? We can make the changes quickly and wrap them into this pending release.

eddelbuettel commented 3 years ago

We probably should then also clean up this:

    res <- bds_Impl(con, security, field, options, overrides, verbose, identity)
    if (typeof(res)=="list" && length(res)==1) {
        res <- res[[1]]
    }
    res

If security is indeed always a single item (which I cannot test now) then we do not need the if (...) { ...} code.

eddelbuettel commented 3 years ago

@mtkerbeR I added (by standard custom) and entry to the ChangeLog for your change, it is currently part of the (final) PR for the next release. I used the email from this Michael Kerber. If I picked the wrong Michael Kerber here (possible ...) please let me know what the correct address is. Thanks again for your patch to the documentation!

mtkerbeR commented 3 years ago

@eddelbuettel Thanks for including my suggestion! Yes, you got my namesake - my email is mtkerber@gmail.com

eddelbuettel commented 3 years ago

I feared as much---his profile, while genuinely impressive, lacked any hint of financial data nerdiness :) Will update.