[Rcpp-devel] Starting R Interpreter from C++

Wolf Vollprecht w.vollprecht at gmail.com
Mon Jun 12 21:47:58 CEST 2017


RInside seems to have done the trick! Awesome.

I have no strong opinions on how to implement the tests. The only reason
why I wanted the embedded R solution is because we use it that way with
Python and Julia, and it gives us "raw C++" tests. In the future, we might
also have a xtensor-test package, that we can easily use to write tests for
all three languages (in C++) at the same time (through metaprogramming).

But we will definitly also add tests in R (as we have done with Python and
Julia, too).
It would be awesome if you have a chance to add some to your variant.
I am going to fix up the C++ tests that I've added to the "big" PR and make
sure that at least those we have right now work fine to establish a
baseline to work from.

Cheers!

Wolf


2017-06-12 4:11 GMT-07:00 Dirk Eddelbuettel <edd at debian.org>:

>
> On 12 June 2017 at 11:22, Romain Francois wrote:
> | You might be looking for RInside.
>
> Exactly correct in the narrow sense of 'how to get R going from C++'.
>
> On 12 June 2017 at 01:11, Wolf Vollprecht wrote:
> | I am trying to run C++ tests from C++ directly.
> | It looks like I need to start the R interpreter for memory management
> etc.
>
> The wider, normal sense of the question is, I suspect, how to add unit
> tests
> to an R package such as your xtensor-r.  Give me a day or two and I may
> get a
> chance to add this to my variant of your project.
>
> You generally do NOT want force an embedded R interpreter __as any Rcpp
> project is already called from R__.  Use CRAN as a repository of (as of
> today) 1045 example packages.  I don't think a single one embeds R for
> testing.  The RUnit (older, used by Rcpp itself) and testthat frameworks
> are
> popular.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20170612/fdc53c81/attachment.html>


More information about the Rcpp-devel mailing list