Rblpapi icon indicating copy to clipboard operation
Rblpapi copied to clipboard

Integration of condition code support into getTicks

Open joel23888 opened this issue 8 years ago • 3 comments

Here are my initial thoughts on integrating condition code support into getTicks. @eddelbuettel or anyone else interested in this, could you let me know your thoughts?

I think it would be useful to have options to:

  • Return condition codes or not; and
  • Filter ticks based on condition codes on the C++ side even if condition codes are not to be returned.

In terms of parameters and behavior:

  • What about a named vector options which would include (amongst any other options) the options returnAs, setCondCodes, and an option to filter to (or exclude) condition codes in a character vector?
  • If the returnAs option is set to matrix the function would always return only numeric data, and in that case condition codes would never be returned (although filtering ticks on condition codes would still work).

joel23888 avatar Mar 17 '16 07:03 joel23888

I would like to keep the interface as unchanged as possible.

And I think we can do that if we simply ... give a different meaning to setCondCodes (maybe even call it getCondCodes ?): if it is set, return types requiring numbering representations (xts, fts, matrix) are all rules out. So condCodes implies data.frame.

As for the implementation, just make your core the default. For all other methods we convert the data.frame before returning and drop the condCodes column.

Easier?

eddelbuettel avatar Mar 17 '16 11:03 eddelbuettel

This sounds good to me. I will take this approach. Will look at this next week (hopefully).

joel23888 avatar Mar 18 '16 07:03 joel23888

I am going to pick this up as just discussed in #146 which I suggest we revert.

eddelbuettel avatar Sep 11 '16 23:09 eddelbuettel