OHDSI Home | Forums | Wiki | Github

R support of integer 64 bit

(Nicolas Paris) #1


I turns out R does not natively handle 64bit integers[1]. There is some warkarounds that have some drawbacks (casting as string -> slow performances ; casting as numeric -> can introduce silent errors (just try 2^53 == 2^53+1 ) ; using packages -> some other packages are not compatible).

In a federation/big data perspective, this might become a problem in several years, or is already a problem.
However handling 64bit natively looks not that trivial for R-core[2]

At this step of the project, it might be important to discuss this limitation for a stable future. I do not want to troll but python does not have this limitation, and is growing fast as a statistical/machine learning web language [3].

I guess that is better than nothing to discuss of that, and maybe mixing OMOP to python could be of interest to enlarge the developer community, at least. An other approach would be to help the R community to get rid of this issue.


[1] https://www.r-bloggers.com/r-in-a-64-bit-world/
[2] http://r.789695.n4.nabble.com/How-to-handle-INT8-data-td4728230.html
[3] http://www.benfrederickson.com/ranking-programming-languages-by-github-users/

64-bit integers in HADES
(Henrik John) #2

I have been using R and the OHDSI packages for about three month now and have run into similar problems.

Although packages such as ‘bit64’ allow me to cast to 64 bit integers, this new data type is generally not compatible with the standard packages I’d use. For that reason I also prefer Python for any kind of EDA.

As a side note, the PatientLevelPrediction package in R uses a Python interface already to make use of the powerful scikit-learn library.