[Rcpp-devel] Fwd: Re: devtools load_all() and modules
Glenn Lawyer
lawyer at mpi-inf.mpg.de
Wed Mar 21 10:56:00 CET 2012
Dear Dirk,
I have now written a patch which incorporates your answer to
Hadley in the Rcpp-package manual. I am attaching the complete
*Rnw file. The diff is below.
Please let me know your preferred channel for me to submit future
patch suggestions.
Kind regards,
+glenn
########## begin diff output ##################
233,244d232
<
< \subsubsection{\proglang{C++} development workflow}
< \proglang{R}'s package framework elegantly supports rapid
prototyping and experimental code development. One suggested
workflow tests changes to \proglange{C++} code 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 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/.}
<
< Alternately, rapid prototyping can be conducted using the
inline package and \Sexpr{cxxfunction}.
<
<
########## end diff output ##################
-------- Original Message --------
Subject: Re: [Rcpp-devel] devtools load_all() and modules
Date: Tue, 20 Mar 2012 12:38:37 -0500
From: Dirk Eddelbuettel <edd at debian.org>
To: Hadley Wickham <hadley at rice.edu>
CC: rcpp-devel at r-forge.wu-wien.ac.at
On 20 March 2012 at 12:22, Hadley Wickham wrote:
|> For usage beyond what we document and test, you're on your own. If you want
|> to explore usage with devtools and other means, go for it.
|>
|> But I will be unlikely to have time to work this out for you, unfortunately.
|
| Let me flip this around on you - when you're developing a package that
| uses Rcpp, could you outline your workflow? After modifying your R
| and C++ code, what sequence of steps do you take so that you can try
| out the code in an R session? It would be really useful to hear what
| workflow that you (and others) find most helpful.
Sure, very valid question. I tend to do two things:
a) at times experiment/try/play with the inline package and cxxfunction
b) much more often, work with a package where, for force of habit, my
typical workflow often is
$ R CMD INSTALL mypkg&& r -lmypkg -e 'someFunctionToTickle(3.14)'
which does a 'library(mypkg)' for me (which is how r resolves the -l
arguments) and then executes the R expression
as I never got really happy with any of the unloading attempts. Littler's r
starts very quickly and gives me a guaranteed clean slate, so I tend to work
from there.
Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120321/c7adc57d/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Rcpp-package.Rnw
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120321/c7adc57d/attachment-0001.ksh>
More information about the Rcpp-devel
mailing list