[Rd] request for use cases for larger integers in R

Hugo Gruson hugo@gru@on @end|ng |rom norm@|e@up@org
Tue Aug 11 16:48:12 CEST 2026


Adding my use case but it mostly aligns with what others have already 
mentioned, with a couple of additional explicit highlights:

I am maintaining a couple of packages that ingest data from binary files 
generated from other languages. It is not uncommon to have to read 
int64, uint32 or uint64 from these binary files.

Currently, I have to use custom code, usually in C, to read these types 
& convert them to int32 if they can fit and convert to NA / double / 
bit64 otherwise depending on the case. I would be delighted to be able 
to remove this custom code and rely on native support for larger integers.

Compared to other answers, I would like to insist on two points, which 
may very well already be included in your proposal:

- the same issue exists for uint32 & uint64 so a solution addressing 
these would provide even more value than a solution just for signed int64

- it would be great if these new data types were usable directly with 
readBin() / writeBin()

Best wishes,

Hugo

On 24/07/2026 20:04, luke-tierney--- via R-devel wrote:
> R integers are current limited to a magnitude ot 2^31 - 1. Integer
> values up to a magnitude of 2^53 can be represented exatcly as
> doubles. At times it would be useful to be able to handle larger
> values.
>
> Several options for adding support for large integers to R are under
> consideration, each with advantages and disadvantages. To help with
> deciding how to move forward it would be helpful to have a collection
> of use cases where something is either difficult or impossible to
> achieve with the current R integer representations. Examples would be
> most helpful if they are concrete enough to allow us to build test
> cases.
>
> Thanks,
>
> luke
>



More information about the R-devel mailing list