[Rd] external equiv to R_serialize()?

Joe Conway mail at joeconway.com
Tue Mar 31 17:54:45 CEST 2009


Prof Brian Ripley wrote:
> On Mon, 30 Mar 2009, Joe Conway wrote:
> 
>> I'm trying to efficiently allow conversion of R objects to PostgreSQL 
>> bytea (raw binary) datatype within PL/R for persistent storage in 
>> Postgres tables. I have found R_serialize() which looks like what I 
>> need, -- e.g. R_serialize(object, NULL, FALSE, NULL) -- except that it 
>> is marked attribute_hidden. Is there some other externally available 
>> interface that I can use?
> 
> R_Serialize is in Rinternals.h.  R_serialize is a wrapper using 
> connections, and connections do not have a public API.

OK, thanks.

> Do note the comments in ?serialize: 'persistent' storage of objects in 
> an experimental format is somewhat contradictory.

Good point -- I'll put a suitable warning in my documentation. The 
typical use case people describe is more of a "materialized view" than 
it is primary storage, so I think this is still very useful.

Thank you for your response.

Joe



More information about the R-devel mailing list