<p>We've integrated the catch-all Protocol Buffer schema for R objects from RHIPE into RProtoBuf and new functions <code>serialize_pb</code> and <code>unserialize_pb</code> to convert arbitrary R objects such as data.frames into protocol buffers.  For example:</p>

<pre><code>msg &lt;- tempfile();
serialize_pb(iris, msg);
obj &lt;- unserialize_pb(msg);
identical(iris, obj);
</code></pre>

<p>This functionality was introduced in <a href="http://cran.r-project.org/web/packages/RProtoBuf/index.html" rel="nofollow">RProtoBuf 0.4</a> which came out after your question was originally asked.  See a preprint of our JSS paper that introduces these new features on arXiv : <a href="http://arxiv.org/abs/1401.7372" rel="nofollow">RProtoBuf: Efficient Cross-Language Data Serialization in R</a></p>
How to use RProtobuf to map R base types or SEXP objects
<p>I think it is possible but I am looking for a way to map base types in R using rprotobuf package. What I want is to create a network/server very similar to Rserve but using protocol buffers to serialize the data rather than Rserve's QAP protocol. My question is how would it be possible to map something like a data.frame into a protocol buffer. Here is an example of kind of what I would like it to look like but let me know if I am going about it the wrong way.</p>

<pre><code>message TextCell {
   required string name = 1;
}

message NumericCell {
   repeated int32 num 1;
}

message TextColumn {
   repeated TextCell text 1;
}

message NumericColumn {
   repeated NumericCell number 1;
}

message DataFrame {
  optional NumericColumn numbericColumn = 1;
  optional TextColumn textColumns = 2;
}
</code></pre>

<p>I mocked this up just now so it will probably have errors but this is the concept that I am looking at and it doesn't take into account things like Doubles which seems like a bad idea. Would it possibly be a better solution to use a bytes type and deserialize the column on the other side. Not sure how to attack this problem yet and feedback would be greatly appreciated from more knowledgeable people.</p>

<p>Note, I wish to use protocol buffers due to their storage efficiency and the possibility to use many more languages but there is nothing wrong with the QAP protocol. It is very fast and efficient.</p>

<p>Thanks in advance</p>