business-science / riingo

An R interface to the Tiingo stock price API
https://business-science.github.io/riingo/
Other
51 stars 9 forks source link

[FR] Offer option to not return tibble #3

Closed eddelbuettel closed 4 years ago

eddelbuettel commented 6 years ago

In RBlpApi, we always had different data containers for the time series data (ie xts, fts, ...; I added data.frame) That is not a bad practice. Maybe you coulf follow suit, especially that we have so many different ones now?

Feel free to close if you disagree, but also see next issue.

DavisVaughan commented 6 years ago

I could follow suit with Rblpapi and include a riingo_type option that could be set by the user through riingo_set_return_type() or something similar. I think the easiest thing to then do would be to keep the implementation the same, but at the end of something like riingo_prices() call convert(<tibble_to_be_returned>) that would return as an accepted time series format (xts, etc). I wouldn't be opposed.

eddelbuettel commented 6 years ago

Yes, that's what we do because Whit did of course return an fts but then few other people use fts, defaulting to data.frame is suboptimal etc pp. So why not offer a choice, and just deal with it at the very end. That would be nice to -- otherwise one can of course convert on retrieval etc pp.

DavisVaughan commented 4 years ago

Just for simplicity I'm going to let users convert after the fact if they want to