[Rprotobuf-commits] r886 - papers/jss

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 25 04:01:03 CET 2014


Author: edd
Date: 2014-03-25 04:01:01 +0100 (Tue, 25 Mar 2014)
New Revision: 886

Modified:
   papers/jss/article.R
   papers/jss/article.Rnw
Log:
minor pass over Murray's excellent edits


Modified: papers/jss/article.R
===================================================================
--- papers/jss/article.R	2014-03-25 02:42:19 UTC (rev 885)
+++ papers/jss/article.R	2014-03-25 03:01:01 UTC (rev 886)
@@ -190,20 +190,20 @@
 
 
 ###################################################
-### code chunk number 24: article.Rnw:1027-1028
+### code chunk number 24: article.Rnw:1028-1029
 ###################################################
 2^53 == (2^53 + 1)
 
 
 ###################################################
-### code chunk number 25: article.Rnw:1078-1080
+### code chunk number 25: article.Rnw:1080-1082
 ###################################################
 msg <- serialize_pb(iris, NULL)
 identical(iris, unserialize_pb(msg))
 
 
 ###################################################
-### code chunk number 26: article.Rnw:1111-1114
+### code chunk number 26: article.Rnw:1113-1116
 ###################################################
 datasets <- as.data.frame(data(package="datasets")$results)
 datasets$name <- sub("\\s+.*$", "", datasets$Item)
@@ -211,13 +211,13 @@
 
 
 ###################################################
-### code chunk number 27: article.Rnw:1124-1125
+### code chunk number 27: article.Rnw:1126-1127
 ###################################################
 m <- sum(sapply(datasets$name, function(x) can_serialize_pb(get(x))))
 
 
 ###################################################
-### code chunk number 28: article.Rnw:1138-1145
+### code chunk number 28: article.Rnw:1140-1147
 ###################################################
 attr(CO2, "formula")
 msg <- serialize_pb(CO2, NULL)
@@ -229,7 +229,7 @@
 
 
 ###################################################
-### code chunk number 29: article.Rnw:1161-1180
+### code chunk number 29: article.Rnw:1163-1182
 ###################################################
 datasets$object.size <- unname(sapply(datasets$name, function(x) object.size(eval(as.name(x)))))
 
@@ -253,7 +253,7 @@
 
 
 ###################################################
-### code chunk number 30: article.Rnw:1388-1393
+### code chunk number 30: article.Rnw:1390-1395
 ###################################################
 require(RProtoBuf)
 require(HistogramTools)
@@ -263,7 +263,7 @@
 
 
 ###################################################
-### code chunk number 31: article.Rnw:1461-1468 (eval = FALSE)
+### code chunk number 31: article.Rnw:1463-1470 (eval = FALSE)
 ###################################################
 ## library("RProtoBuf")
 ## library("httr")
@@ -275,7 +275,7 @@
 
 
 ###################################################
-### code chunk number 32: article.Rnw:1527-1543 (eval = FALSE)
+### code chunk number 32: article.Rnw:1529-1545 (eval = FALSE)
 ###################################################
 ## library("httr")       
 ## library("RProtoBuf")
@@ -296,7 +296,7 @@
 
 
 ###################################################
-### code chunk number 33: article.Rnw:1547-1550 (eval = FALSE)
+### code chunk number 33: article.Rnw:1549-1552 (eval = FALSE)
 ###################################################
 ## fnargs <- unserialize_pb(inputmsg)
 ## val <- do.call(stats::rnorm, fnargs)

Modified: papers/jss/article.Rnw
===================================================================
--- papers/jss/article.Rnw	2014-03-25 02:42:19 UTC (rev 885)
+++ papers/jss/article.Rnw	2014-03-25 03:01:01 UTC (rev 886)
@@ -1020,29 +1020,31 @@
 \label{sec:int64}
 
 \proglang{R} also does not support the native 64-bit integer type. Numeric vectors
-with values $\geq 2^{31}$ can only be stored as doubles, which have
-limited precision. Thereby \proglang{R} loses the ability to distinguish some
-distinct integers:
+with integer values greater or equal to $2^{31}$ can only be stored as
+floating-point double precision variables. This conversion incurs a loss of
+precision, and \proglang{R} loses the ability to distinguish between some
+distinct integer variables:
 
 <<>>=
 2^53 == (2^53 + 1)
 @
 
-However, most modern languages do have support for 64-bit integers, 
+Most modern languages do have support for 64-bit integer values, 
 which becomes problematic when \pkg{RProtoBuf} is used to exchange data 
 with a system that requires this integer type. To work around this, 
 \pkg{RProtoBuf} allows users to get and set 64-bit integer values by specifying 
 them as character strings.
 
 On 64-bit platforms, character strings representing large decimal
-numbers will be coerced to int64 during assignment to 64-bit protocol
-buffer types to work around the lack of native 64-bit types in \proglang{R}.  The
-values are stored as distinct int64 values in memory but when accessed
-from \proglang{R} language code they will be coerced into numeric values.  If the
+numbers will be coerced to \code{int64} during assignment to 64-bit Protocol
+Buffer types to work around the lack of native 64-bit types in \proglang{R} itself.  The
+values are stored as distinct \code{int64} values in memory. But when accessed
+from \proglang{R} language code, they will be coerced into numeric
+(floating-point) values.  If the
 full 64-bit precision is required, the \code{RProtoBuf.int64AsString}
-option can be set to \code{TRUE} to return int64 values from messages as character
-strings.  The character values are useful because they can
-accurately be used as unique identifiers and can easily be passed to \proglang{R}
+option can be set to \code{TRUE} to return \code{int64} values from messages as character
+strings.  Such character values are useful because they can
+accurately be used as unique identifiers, and can easily be passed to \proglang{R}
 packages such as \pkg{int64} \citep{int64} or \pkg{bit64}
 \citep{bit64} which represent 64-bit integers in \proglang{R}.
 



More information about the Rprotobuf-commits mailing list