[Rcpp-devel] Step-by-Step Plan to Code Writing and Testing with Rcpp, RcppGSL or RcppArmadillo
Savitsky, Terrance
savitsky at rand.org
Thu Dec 9 02:44:04 CET 2010
I'm having difficulty to find "How-to" documentation; the papers and
presentations (including the RcppExamples package) are exciting, but
focus on marketing use, rather than providing instructions. I'd
appreciate any help to get started to:
1. Code C++ using the Rcpp, RcppGSL and RcppArmadillo libraries.
a. May I link my IDE (netbeans) to the lib.a files and use the
appropriate .h files for composing C++ code for compilation in R?
b. Do RcppGSL and RcppArmadillo contain the Rcpp classes or should
the header files from both be included (e.g. #include Rcpp.h, #include
RcppArmadillo.h)
c. The matrix and vector classes, including views, Rcpp
implementation of the C library GSL employs new C++ capabilities and
different syntax (e.g. extraction of pointers from matrix or vector view
objects). Is there detailed documentation with examples for these class
implementations. The differences from GSL disable using that
documentation.
d. Should RcppExport be used in place of 'extern C' in C++ under
Rcpp whenever we wish to input R data types such as matrix, vector and
list (due to need to call .Call)?
2. Compile and debug code using Inline or other preferred
alternatives.
a. The illustrations in presentations seem to copy and paste the
entire code from C++ in single quotes with an assignment to a variable
subsequently used with inline in R. My code (a Bayesian MCMC
implementation) will be on the order of 600 lines long with about 10
input variables. Is there a better way to use inline?
b. Is there any help on code debugging? (e.g. some equivalent of
'gdb').
3. Writing a package.
a. What is the 'LinkingTo' declaration - what purpose does it
serve and where is it used?
b. Same for Makevars and Makevars.win?
Thanks, Terrance Savitsky
__________________________________________________________________________
This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20101208/602074cc/attachment-0001.htm>
More information about the Rcpp-devel
mailing list