[Rcpp-devel] Fwd: Re: devtools load_all() and modules
Glenn Lawyer
lawyer at mpi-inf.mpg.de
Wed Mar 21 14:06:38 CET 2012
On 03/21/2012 01:27 PM, Dirk Eddelbuettel wrote:
> I wonder if that should go to the Rcpp-FAQ instead of Rcpp-package?
I believe in the dictatorial approach-- your vision, you decide.
Diff -u looked at your answer to Hadley's question and suggests
the following changes to Rcpp-FAQ.Rnw:
--- Rcpp/inst/doc/Rcpp-FAQ/Rcpp-FAQ.Rnw 2012-01-25
16:50:01.000000000 +0100
+++ Rcpp-FAQ.Rnw 2012-03-21 14:01:00.000000000 +0100
@@ -157,6 +157,7 @@
@
\subsection{How do I quickly prototype my code ?}
+\subsubsection{Using \pkg{inline}}
\label{using-inline}
The \pkg{inline} package \citep{CRAN:inline} provides the functions
@@ -195,6 +196,16 @@
The \texttt{verbose} argument of \Sexpr{link("cxxfunction")} is
very
useful as it shows how \pkg{inline} runs the show.
+\subsubsection{As a package}
+\label{prototyping-packages}
+Alternately, one can work directly with the package structure.
Changes to \proglange{C++} code can be compiled and tested from
the command line via:
+<<echo=FALSE>>=
+ $ R CMD INSTALL mypkg && r -lmypkg -e 'someFunctionToTickle(3.14)'
+@
+
+The second command calls 'r' (littler), not 'R'. Littler is an
alternative front end to GNU R designed for '#!' (hashbang)
scripting. It has fast start-up times and gives a guaranteed clean
slate. The -l option calls 'library(mypkg)' before executing the
\proglang{R} expression. Littler is available via most Linux
distribution's package management systems. The project homepage is
\href{http://code.google.com/p/littler/.}
+
+
\subsection{How do I convert my prototyped code to a package ?}
\label{from-inline-to-package}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120321/90f0a047/attachment-0001.html>
More information about the Rcpp-devel
mailing list