[R] R/3.0.0 serialize limits

Sam.Moskwa at csiro.au Sam.Moskwa at csiro.au
Tue Apr 30 04:11:30 CEST 2013


Hello,

I am wondering if I am misinterpreting something from R/3.0.0 NEWS


LONG VECTORS:

  This section applies only to 64-bit platforms.
...
    o serialize() to a raw vector is unlimited in size (except by
      resources).


However when I try the following it fails:

> foo <- raw(2500000000)
> print(object.size(foo),units="auto")
2.3 Gb
> bar <- serialize(foo, NULL)
Error: serialization is too large to store in a raw vector

However this works:

> foo <- raw(2000000000)
> print(object.size(foo),units="auto")
1.9 Gb
> bar <- serialize(foo, NULL)


So it appears there may be a 2GB limit, which I've read should only be the case for 32-bit or pre-R/3.0.0 installations.

> sessionInfo()
R version 3.0.0 (2013-04-03)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     


I've tested this on a few different hosts with no success - Ubuntu Raring Ringtail (apt-get), SLES 11.2 (building R from source), and Windows binaries



Regards,
Sam



More information about the R-help mailing list