[Rprotobuf-commits] r631 - pkg/vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Dec 30 19:03:14 CET 2013
Author: murray
Date: 2013-12-30 19:03:13 +0100 (Mon, 30 Dec 2013)
New Revision: 631
Modified:
pkg/vignettes/RProtoBuf-intro.Rnw
Log:
Note that uint32 types (uint32, fixed32) are stored as doubles now,
not as integers, since R does not have an unsigned integer type.
Modified: pkg/vignettes/RProtoBuf-intro.Rnw
===================================================================
--- pkg/vignettes/RProtoBuf-intro.Rnw 2013-12-30 17:53:45 UTC (rev 630)
+++ pkg/vignettes/RProtoBuf-intro.Rnw 2013-12-30 18:03:13 UTC (rev 631)
@@ -437,10 +437,11 @@
double & \texttt{double} vector & \texttt{double} vector \\
float & \texttt{double} vector & \texttt{double} vector \\
\hline
+uint32 & \texttt{double} vector & \texttt{double} vector \\
+fixed32 & \texttt{double} vector & \texttt{double} vector \\
+\hline
int32 & \texttt{integer} vector & \texttt{integer} vector \\
-uint32 & \texttt{integer} vector & \texttt{integer} vector \\
sint32 & \texttt{integer} vector & \texttt{integer} vector \\
-fixed32 & \texttt{integer} vector & \texttt{integer} vector \\
sfixed32 & \texttt{integer} vector & \texttt{integer} vector \\
\hline
int64 & \texttt{integer} or \texttt{character}
@@ -465,7 +466,8 @@
R type retrieved by the extractors. \footnotesize{1. R lacks native
64-bit integers, so the \texttt{RProtoBuf.int64AsString} option is
available to return large integers as characters to avoid losing
- precision. This option is described in Section~\ref{sec:int64}}.}
+ precision. This option is described in Section~\ref{sec:int64}}. R
+ also lacks an unsigned integer type.}
\end{table}
\subsubsection{Modify fields}
@@ -1966,8 +1968,8 @@
<<echo=FALSE,print=FALSE>>=
extend.proto <- tempfile()
writeLines(c(
- paste0('import "', system.file("proto/addressbook.proto",
- package="RProtoBuf"), '";'),
+ paste0('import "',
+ name(tutorial.Person$fileDescriptor(), TRUE), '";'),
"package tutorial;",
paste0("extend Person {\n optional string nationality = 100;\n}")),
extend.proto)
More information about the Rprotobuf-commits
mailing list