[Rcpp-commits] r3365 - pkg/int64/inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 16 11:41:59 CET 2011


Author: romain
Date: 2011-11-16 11:41:59 +0100 (Wed, 16 Nov 2011)
New Revision: 3365

Modified:
   pkg/int64/inst/doc/int64.Rnw
Log:
mention NA in vignette

Modified: pkg/int64/inst/doc/int64.Rnw
===================================================================
--- pkg/int64/inst/doc/int64.Rnw	2011-11-16 10:28:21 UTC (rev 3364)
+++ pkg/int64/inst/doc/int64.Rnw	2011-11-16 10:41:59 UTC (rev 3365)
@@ -160,6 +160,7 @@
 \item Data must be serializable
 \item int64 and uint64 vectors have to be usable of 
 columns of data frames. 
+\item The int64 and uint64 types must supposrt missing values (NA)
 \end{itemize}
             
 \subsection{Creating new vectors}
@@ -246,6 +247,7 @@
 any( x )
 all( x )
 @
+         
 
 \section{Binary representation}
 
@@ -259,7 +261,7 @@
 binary( as.uint64( 1:4 ) ) # unsigned 64 bit integer (uint64)
 @
 
-\section{Numeric limits}
+\section{Numeric limits and missing values}
 
 The \texttt{numeric\_limits} function gives the limits for 
 types \texttt{integer}, \texttt{int64}, \texttt{uint64}. 
@@ -270,5 +272,19 @@
 numeric_limits( "uint64" )
 @
 
+int64 and uint64 classes support missing values using the same mechanism as
+R uses for integer vectors. 
+
+For signed 64 bit integer vectors (int64), NA is represented by the 
+value $-2^{63}$, hence the range of acceptable values is 
+
+$$[-2^{63}+1,2^{63}-1]$$ 
+
+For unsigned 64 bit integer vectors (uint64), NA is represented by the
+value $2^{64}-1$, hence the range of acceptable values is
+
+$$[0,2^{64}-2]$$
+
+
 \end{document}
 



More information about the Rcpp-commits mailing list