RCall.jl
RCall.jl copied to clipboard
Passing DataFrame with large integer value in it throws cryptic error
Here is the repo:
using DataFrames, RCall
df = DataFrame(x=[2^63 - 1, 2])
R"$df"
It is expected due to the limitation of integer size, R has a limitation of ~~2^32-1~~ 2^31-1. It also happens for plain julia integer RObject(2^63 - 1).
For those large integer values, you should convert them to float numbers/float vectors.
Ah, interesting! Maybe RCall could throw a better error message that points people in the right direction if this happens?
Maybe we could define our own RConversionException?
we need to first investigate the time/resources required for checking integer overflow or any other conversion validity.
However, making our own exceptions is not a bad idea.