RDS2: An improvement to serialization in R.

Description Details

Description

RDS2 offers a slightly improved serialization format over R's built-in [RDS](http://cran.r-project.org/web/packages/RDS/index.html) that solves the problem of serializing external pointers (e.g., to non-native C structures).

Details

The package overwrites R's built-in readRDS and saveRDS functions. If the object being saved or read has an attributes called "RDS2.serialize", it will use this attribute to serialize any normally unserializable content associated with the object.

The RDS2.serialize attribute should be a list consisting of a read and write function that transforms the non-native R object into a native R object. For example, it could take C structures attached to the object, serialize them as raw objects expressing the binary contents and attach them to the R object during writing, and reverse this process during reading.


robertzk/RDS2 documentation built on May 25, 2017, 5:24 a.m.