[Rcpp-commits] r679 - papers/rjournal
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Feb 14 21:46:39 CET 2010
Author: romain
Date: 2010-02-14 21:46:37 +0100 (Sun, 14 Feb 2010)
New Revision: 679
Modified:
papers/rjournal/EddelbuettelFrancois.tex
Log:
split the inline call in two parts (as the other one)
Modified: papers/rjournal/EddelbuettelFrancois.tex
===================================================================
--- papers/rjournal/EddelbuettelFrancois.tex 2010-02-14 20:41:25 UTC (rev 678)
+++ papers/rjournal/EddelbuettelFrancois.tex 2010-02-14 20:46:37 UTC (rev 679)
@@ -616,12 +616,12 @@
to emulate a
simpler\footnote{The version of lapply does not include usage of the
ellipsis (\code{...}). Other constructs in \pkg{Rcpp} can be
-used to emulate \code{lapply} more closely. } version of \code{lapply}.
+used to emulate \code{lapply} more closely. } version of \code{lapply}
+using the \code{transform} algorithm from the STL.
% [Romain] does the code need comments ?
\begin{example}
-cpp_lapply <- cfunction(
- signature(data="list", fun = "function"), '
+src <- '
Rcpp::List input(data);
Rcpp::Function f(fun) ;
Rcpp::List output(input.size());
@@ -631,7 +631,10 @@
f ) ;
output.names() = input.names() ;
return output ;
-', Rcpp = TRUE )
+ '
+cpp_lapply <- cfunction(
+\ \ signature(data="list", fun = "function"),
+\ \ src, Rcpp = TRUE )
\end{example}
We can then use this to calculate the summary of each
More information about the Rcpp-commits
mailing list