Re: [Rd] C versions of serialize/unserialize in packages

From: Henrik Bengtsson <>
Date: Thu, 31 Jul 2008 07:53:17 -0700


On Thu, Jul 31, 2008 at 6:35 AM, Roger D. Peng <> wrote:
> Are the functions 'R_Unserialize' and 'R_InitFileInPStream' allowed to
> be used in R packages? I guess I'm just not clear on the implications
> of this comment in 'Rinternals.h':
> /* The connection interface is not yet available to packages. To
> allow limited use of connection pointers this defines the opaque
> pointer type. */
> I have a function in the 'filehash' package that unserializes a bunch
> of objects from a file and it seems to run much faster in C than in R.
> But I don't want to release something that uses a non-public
> function/interface.

You say "much faster". Could this be related to what I recently observed:

July 24, 2008 thread '[Rd] serialize() to via temporary file is heaps faster than doing it directly (on Windows)' [ ].

My $0.02


> Thanks,
> -roger
> --
> Roger D. Peng |
> ______________________________________________
> mailing list
> mailing list Received on Thu 31 Jul 2008 - 15:01:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jul 2008 - 16:35:45 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive