quandl / quandl-r

This is Quandl's R Package
https://cran.r-project.org/web/packages/Quandl/
Other
139 stars 55 forks source link

Information after decimal point is lost on API calls in R. #70

Open milosh-dev opened 2 years ago

milosh-dev commented 2 years ago

Quandl skips/rounds the decimal points on my API calls.

For example
futures = Quandl("CFTC/IC6_F_ALL_CR") Returns rounded 100, 99, or 98 where all the information after floating-point is lost. And yes, it's not "hiden", but the precision after floating-point is lost, this is obvious when one plots the data or multiplies the series by 100.

The same problem applies for other series as well (for example: "OPEC/ORB").

I do have European number settings in my Ubuntu 20.04 compter (e.g thousands are separated by space and floating points by comma on most occasions), but I have not used this setting for R and this has no effect on my other R code/other libraries. E.g the floating points are still separated by "." in R and the other code works without problems.

My current hypothesis is that the problem is related to jsonlite library (see: https://stackoverflow.com/questions/36038349/significant-digits-when-converting-json-using-fromjson-in-jsonlite). I will fork the Quandl library and test, whether that's the culprit.