Skip to content

external equiv to R_serialize()?

4 messages · Brian Ripley, Joe Conway

#
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?

Thanks,

Joe
#
On Mon, 30 Mar 2009, Joe Conway wrote:

            
R_Serialize is in Rinternals.h.  R_serialize is a wrapper using 
connections, and connections do not have a public API.

Do note the comments in ?serialize: 'persistent' storage of objects in 
an experimental format is somewhat contradictory.
#
Prof Brian Ripley wrote:
OK, thanks.
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
#
Prof Brian Ripley wrote:
Sorry if I'm missing something, but it seems that although R_Serialize() 
is public, the support functions needed to use R_outpstream_t are not. 
So I'm back to my initial question -- is there an alternative public 
interface that I can use?

Thanks,

Joe