RApiSerialize (version 0.1.0)

RApiSerialize-package: R API for Serialization

Description

This package provides other packages with access to the internal R serialization code. Access is provided at the C function level via the registered function facility

For convenience and testing purposes, two wrapper functions are also provided at the R level.

Usage

serializeToRaw(obj)
  unserializeFromRaw(obj)

Arguments

obj

An R object which is going to (un)serialized by the corresponding function.

Author

Dirk Eddelbuettel put together this package, based on earlier work by Junji Nakano and Ei-ji Nakama who also included the C code from R for serialization in their Rhpc package. R Core wrote the underlying C code for use in R itself.

The package is maintained by Dirk Eddelbuettel.

Details

The C code in this package is taken from R source code, where it provided for use by R only in a way that renders it inaccessible to other packages.

This package aims to fill this gap by providing access to the same functionality, at the cost of making a copy.

To use the serialization and deserialization code provided here, a client package simply adds LinkingTo: RApiSerialize in its DESCRIPTION file and includes the header file RApiSerializeAPI.h.

See Also

The R source code in src/main/serialize.c.

Examples

Run this code
  ## calling the R wrapper 
  serializeToRaw(letters)

Run the code above in your browser using DataCamp Workspace