[Rcpp-commits] r1477 - pkg/Rcpp/inst/doc/Rcpp-extending

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 7 17:19:13 CEST 2010


Author: edd
Date: 2010-06-07 17:19:13 +0200 (Mon, 07 Jun 2010)
New Revision: 1477

Modified:
   pkg/Rcpp/inst/doc/Rcpp-extending/Rcpp-extending.Rnw
Log:
another round


Modified: pkg/Rcpp/inst/doc/Rcpp-extending/Rcpp-extending.Rnw
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-extending/Rcpp-extending.Rnw	2010-06-07 14:55:07 UTC (rev 1476)
+++ pkg/Rcpp/inst/doc/Rcpp-extending/Rcpp-extending.Rnw	2010-06-07 15:19:13 UTC (rev 1477)
@@ -80,8 +80,8 @@
   \noindent
   This note provides an overview of the steps programmers should follow to
   extend \pkg{Rcpp} \citep{CRAN:Rcpp} for use with their own classes. This document
-  is based on our experience to extending \pkg{Rcpp} to work with the
-  Armadillo \citep{Armadillo} classes, available in the separate package
+  is based on our experience in extending \pkg{Rcpp} to work with the
+  \pkg{Armadillo} \citep{Armadillo} classes, available in the separate package
   \pkg{RcppArmadillo} \citep{CRAN:RcppArmadillo}. This document assumes
   knowledge of \pkg{Rcpp} as well as some knowledge of \proglang{C++}
   templates.
@@ -90,10 +90,10 @@
 
 \section{Introduction}
 
-\pkg{Rcpp} facilitates data interchange between \proglang{R} and \proglang{C++}
-through the templates \texttt{Rcpp::as} (for conversion from \proglang{C++}) and
-\texttt{Rcpp::wrap} (for conversion to \proglang{C++}).
-Their declarations are as follows:
+\pkg{Rcpp} facilitates data interchange between \proglang{R} and
+\proglang{C++} through the templated member functions \texttt{Rcpp::as} (for
+conversion from \proglang{C++}) and \texttt{Rcpp::wrap} (for conversion to
+\proglang{C++}).  Their declarations are as follows:
 
 <<lang=cpp>>=
 // conversion from R to C++
@@ -338,7 +338,14 @@
 unlink( "code.cpp" )
 @
 
+\section{Summary}
 
+The \pkg{Rcpp} package greatly facilitates the transfer of objects between
+\proglang{R} and \proglang{C++}. This note has shown how to extend \pkg{Rcpp}
+to either user-defined or third-party classes via the \texttt{Rcpp::as} and
+\texttt{Rcpp::wrap} template member functions. Both intrusive and
+non-intrusive approaches were discussed.
+
 \bibliographystyle{abbrvnat}
 \bibliography{Rcpp-modules}
 



More information about the Rcpp-commits mailing list