Wed, 01 Feb 2023

RInside 0.2.18 on CRAN: Maintenance

A new release 0.2.18 of RInside arrived on CRAN and in Debian today. This is the first release in ten months since the 0.2.17 release. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

This release brings a contributed change to how the internal REPL is called: Dominick found the current form more reliable when embedding R on Windows. We also updated a few other things around the package.

The list of changes since the last release:

Changes in RInside version 0.2.18 (2023-02-01)

  • The random number initialization was updated as in R.

  • The main REPL is now running via 'run_Rmainloop()'.

  • Small routine update to package and continuous integration.

My CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page, or to issues tickets at the GitHub repo.

If you like this or other open-source work I do, you can now sponsor me at GitHub.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Fri, 01 Apr 2022

RInside 0.2.17

A new release 0.2.17 of RInside arrived on CRAN and in Debian today. This is the first release in two years since the 0.2.16 release. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

This release brings a minor update for R 4.2.0, due out later this month, and kindly provided by Tomas Kalibera. It updates one function declaration; we wrapped some conditioning around so that RInside continues to build with older releases too. Besides that minor updates were made to continuous integration and some of the package files.

The short list of changes since the last release were:

Changes in RInside version 0.2.17 (2022-03-31)

  • A Windows-only patch for R 4.2.0 kindly provided by Tomas Kalibera was applied, and also conditioned on R (>= 4.2.0)

  • Continuous Integration setup was updated and now uses r-ci.

  • Several updates were made to README.md (badges etc) and DESCRIPTION

My CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page, or to issues tickets at the GitHub repo.

If you like this or other open-source work I do, you can now sponsor me at GitHub.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Thu, 12 Mar 2020

RInside 0.2.16

A new release 0.2.16 of RInside arrived on CRAN and in Debian today. This comes almost exactly one year after the previous release 0.2.15. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

This release brings one new feature, contributed by Lance Bachmeier (with some additional post-processing by me). It adds the ability to embed and call R from C programs and applications. The interface is more limited as we do not get Rcpp for automagic conversion. But this offers the door to a number of applications supporting plain C interface, and the new examples directory for example shows one for ruby. We may add others.

The short list of changes since the last release were:

Changes in RInside version 0.2.16 (2020-03-12)

  • RInside is now embeddable (with a reduced interface) from C applications thanks to Lance Bachmeier (who is now co-author) plus some polish by Dirk in #43)

  • Added R_SESSION_INIIALIZED to list of excluded variables.

  • Added simple diagnostics function to have a registered function.

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page, or to issues tickets at the GitHub repo.

If you like this or other open-source work I do, you can now sponsor me at GitHub. For the first year, GitHub will match your contributions.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Wed, 06 Mar 2019

RInside 0.2.15

A new release 0.2.15 of RInside arrived on CRAN and in Debian today. This marks the first release in almost two years, and it brings some build enhancements. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

RInside is stressing the CRAN system a little in that it triggers a number of NOTE and WARNING messages. Some of these are par for the course as we get close to R internals not all of which are “officially” in the API. My continued thanks to the CRAN team for supporting the package.

It has (once again!) been nearly two years since the last release, and a number of nice extensions, build robustifications (mostly for Windows) and fixes had been submitted over this period—see below for the three key pull requests. There are no new user-facing changes.

The most recent change, and the one triggering the change, was based on a rchk report: the one time we call Rf_eval() could conceivably have a memory allocation race so two additional PROTECT calls make it more watertight. The joys of programming with the C API …

But thanks so much to Tomas for patient help, and to Gábor for maintaining the ubuntu-rchk Docker container. While made for rhub, it is also available pre-made here at Docker Cloud which allowed me to run the rchk.sh script in a local instance.

Changes since the last release were:

Changes in RInside version 0.2.15 (2019-03-06)

  • Improved Windows build support by copying getenv("R_HOME") result and improving backslash handling in environemt variable setting (Jonathon Love in #27 and #28)

  • Improved Windows build support by quote-protecting Rscript path in Makevars.win (François-David Collin in #33)

  • A URL was corrected in README.md (Zé Vinícius in #34).

  • Temporary SEXP objects are handled more carefully at initialization to satisfy rchk (Dirk in #36)

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page, or to issues tickets at the GitHub repo.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Sun, 07 May 2017

RInside 0.2.14

A new release 0.2.14 of RInside is now on CRAN and in Debian.

RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

It has been nearly two years since the last release, and a number of nice extensions, build robustifications and fixes had been submitted over this period---see below for more. The only larger and visible extension is both a new example and some corresponding internal changes to allow a readline prompt in an RInside application, should you desire it.

RInside is stressing the CRAN system a little in that it triggers a number of NOTE and WARNING messages. Some of these are par for the course as we get close to R internals not all of which are "officially" in the API. This lead to the submission sitting a little longer than usual in incoming queue. Going forward we may need to find a way to either sanction these access point, whitelist them or, as a last resort, take the package off CRAN. Time will tell.

Changes since the last release were:

Changes in RInside version 0.2.14 (2017-04-28)

  • Interactive mode can use readline REPL (Łukasz Łaniewski-Wołłk in #25, and Dirk in #26)

  • Windows macros checks now uses _WIN32 (Kevin Ushey in #22)

  • The wt example now links with libboost_system

  • The Makevars file is now more robist (Mattias Ellert in #21)

  • A problem with empty environment variable definitions on Windows was addressed (Jeroen Ooms in #17 addressing #16)

  • HAVE_UINTPTR_T is defined only if not already defined

  • Travis CI is now driven via run.sh from our forked r-travis

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page, or to issues tickets at the GitHub repo.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Wed, 20 May 2015

RInside 0.2.13

A new release 0.2.13 of RInside is now on CRAN. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by Rcpp.

This release works around a bug in R 3.2.0, and addressed in R 3.2.0-patched. The NEWS extract below has more details.

Changes in RInside version 0.2.13 (2015-05-20)

  • Added workaround for a bug in R 3.2.0: by including the file RInterface.h only once we do not getting linker errors due to multiple definitions of R_running_as_main_program (which is now addressed in R-patched as well).

  • Small improvements to the Travis CI script.

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Wed, 28 Jan 2015

RInside 0.2.12

A new release 0.2.12 of RInside is now on CRAN. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp integration package.

This release adds new examples which were contributed by Christian Authmann, plus some updates and fixes including one requested by the CRAN maintainers regarding GNU extensions to Makefile. The NEWS extract below has more details.

Changes in RInside version 0.2.12 (2015-01-27)

  • Several new examples have been added (with most of the work done by Christian Authmann):

    • standard/rinside_sample15.cpp shows how to create a lattice plot (following a StackOverflow question)

    • standard/rinside_sample16.cpp shows object wrapping, and exposing of C++ functions

    • standard/rinside_sample17.cpp does the same via C++11

    • sandboxed_servers/ adds an entire framework of client/server communication outside the main process (but using a subset of supported types)

  • standard/rinside_module_sample9.cpp was repaired following a fix to InternalFunction in Rcpp

  • For the seven example directories which contain a Makefile, the Makefile was renamed GNUmakefile to please R CMD check as well as the CRAN Maintainers.

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Wed, 12 Feb 2014

RInside 0.2.11

A new release 0.2.11 of RInside is now on CRAN. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This release, the first in fourteen months, fixes one important initialization issue created by the recent Rcpp 0.11.0 release, adds a few other changes related to that release and improves a number of small points such as new or improved examples.

The NEWS extract below has more details.

Changes in RInside version 0.2.11 (2014-02-11)

  • Updated for Rcpp 0.11.0:

    • Updated initialization by assigning global environment via pointer only after R itself has been initialized – with special thanks to Kevin Ushey for the fix

    • Updated DESCRIPTION with Imports: instead of Depends:

    • Added correspondiing importFrom(Rcpp, evalCpp) to NAMESPACE

    • Noted in all inst/examples/*/Makefile that Rcpp no longer requires a library argument, but left code for backwards compatibility in case 0.11.0 is not yet installed.

  • Added --vanilla --slave to default arguments for R initialization

  • Added a few more explicit #include statements in the qt example which Qt 5.1 now appears to require – with thanks to Spencer Behling for the patch

  • Added new MPI example with worker functions and RInside instance, kindly contributed by Nicholas Pezolano and Martin Morgan

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rinside | permanent link

Wed, 05 Dec 2012

RInside 0.2.10

The new maintenance release 0.2.10 of RInside is now on CRAN, including Windows binaries. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This release helps with an update to stack checking, required by a recent change in R itself. The NEWS extract below has more details.

Changes in RInside version 0.2.10 (2012-12-05)

  • Adjusted to change in R which requires turning checking of the stack limit off in order to allow for access from multiple threads as in the Wt examples. As there are have been no side-effects, this is enabled by default on all platforms (with the exception of Windows).

  • Added new ‘threads’ example directory with a simple example based on a Boost mutex example.

  • Disabled two examples (passing an external function down) which do not currently work; external pointer use should still work.

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

/code/rinside | permanent link

Mon, 05 Nov 2012

RInside 0.2.9

A new version 0.2.9 of RInside arrived on CRAN earlier today; Windows binaries have already been built too. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This release adds a few new features as detailed in the extract from the NEWS below.

A key new feature is the added support for resilience to bad user input based on discussions and an initial (but altered) patch by Theodore Lytras. There are a few ways that this can be deployedon so we also added two more example programs detailing it. The featured Qt example and the Wt example have been updated to use this too.

Another feature that may be quite useful for some is the additonal attempt to find a value for R_HOME if none has been set. The value is typically found at compile time of the RInside package which poses a problem for those using the Windows build -- which is shipped as a binary reflecting the value of the build system. One alternative has always been to build the package locally too to get the local value, or to set it explicitly. But because the error behaviour – a cryptic message of Cannot open base package – is confusing to many, we now try to call the R function which gets this value from the registry. This may need more tweaking and testing, and if you use RInside on the Windows platform I would appreciate feedback.

The complete list of changes since the last release are summarized below in the corresponding NEWS file entry:

Changes in RInside version 0.2.9 (2012-11-04)

  • Applied (modified) patch by Theodore Lytras which lets RInside recover from some parsing errors and makes RInside applications more tolerant of errors

  • Added non-throwing variants of parseEval() and parseEvalQ()

  • Modified Qt and Wt examples of density estimation applications to be much more resilient to bad user input

  • On Windows, have RInside use R's get_R_HOME() function to get R_HOME value from registry if not set by user

  • Added note to examples/standard/Makefile.win that R_HOME may need to be set to run the executables – so either export your local value, or re-install RInside from source to have it reflected in the library build of libRinside

  • Updated CMake build support for standard, armadillo and eigen

  • Improved CMake builds of examples/standard, examples/eigen and examples/armadillo by detecting architecture

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

/code/rinside | permanent link

Sat, 08 Sep 2012

RInside 0.2.8

This morning version 0.2.8 of RInside arrived on the CRAN sites. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This release adds no new features but improves the build process a little and should make use on Windows a little easier. All changes since the last release are summarized below in the NEWS file entry:

Changes in RInside version 0.2.8 (2012-09-07)

  • Added CMake build support for armadillo and eigen examples, once again kindly contributed by Peter Aberline

  • Corrected Windows package build to always generate a 64 bit static library too

  • Updated package build to no longer require configire and configure.win to update the two header file supplying compile-time information; tightened build dependencies on headers in Makevars / Makevars.win

  • Improved examples/standard/Makefile.win by detecting architecture

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

/code/rinside | permanent link

Mon, 13 Aug 2012

RInside 0.2.7

A new version 0.2.7 of RInside is now available via CRAN. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This release adds two new examples subdirectories demonstrating use of RInside with, respectively, RcppArmadillo and RcppEigen. We extended the 'web application' example using the Wt toolkit by adding CSS and XML support, and added another new example motivated by a StackOverflow question. CMake support has been added for Windows as well thanks to Peter Aberline---he also contributed CMake code for the two new example directories but that contribution made it only into SVN and not this release.

All changes since the last release are summarized below in the NEWS file entry:

Changes in RInside version 0.2.7 (2012-08-12)

  • New fifth examples subdirectory 'armadillo' with two new examples showing how to combine RInside with RcppArmadillo

  • New sixth examples subdirectory 'eigen' with two new examples showing how to combine RInside with RcppEigen

  • Prettified the Wt example 'web application' with CSS use, also added and XML file with simple headers and description text

  • New example rinside_sample12 motivated by StackOverflow question on using sample() from C

  • Added CMake build support on Windows for the examples

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

/code/rinside | permanent link

Thu, 12 Jan 2012

RInside 0.2.6

A new version of RInside, now at 0.2.6, is now available via CRAN. RInside provides a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This release has an additional fix for the Windows use case, adds cmake support files for the examples, switches to using the same RNG initialization of time and process id that R uses, and other minor fixes.

All changes since the last release are summarized below:

2012-01-11  Dirk Eddelbuettel  

        * DESCRIPTION: Release 0.2.6

        * DESCRIPTION: Updated Description: text 

2012-01-08  Dirk Eddelbuettel  

        * src/RInside.cpp: Correct console writer on Windows to not use
        Rprintf (with thanks to both James Bates and John Brzustowski)

        * src/RInside.cpp: Update RNG seeding to same scheme now used by
        R which blends both (millisecond) time and process id

        * src/RInside.cpp: Replace fprintf(stderr,...) with Rf_error(...)
        * src/setenv/setenv.c: Idem
        
        * inst/examples/*: Added CMake build support for all example
        directories kindly provided by Peter Aberline; this helps when coding
        inside of IDEs such as Eclipse, KDevelop or Code::Blocks

        * inst/examples/standard/Makefile.win: Allow for an R_ARCH variable
        to be set to enforce either i386 or x64 builds

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

/code/rinside | permanent link

Thu, 08 Dec 2011

RInside 0.2.5

RInside 0.2.5 arrived on CRAN earlier today. RInside is a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

The big news for this release is that Windows applications once again run! James Bates gets full credit for noticing why Windows binaries died on startup, and provided a short patch which we (after some further simplicifcation) added. So for the first time since the 0.2.0 release, Windows users can just change into the examples/standard directory and issue a simple make -f Makefile.win, and the twelve example binaries will actually work. Yay, and kudos to James.

The other main addition is a new examples directory examples/wt containing the web-application of the density estimation demo I had blogged about last week. By combining the Wt toolkit with RInside, we get C++ "web" applications containing R which is pretty nifty. The example otherwise follows the earlier Qt-based example of a standard desktop application with RInside.

One minor snafu I just noticed is that I was overzealous with the .Rbuildignore file. By excluding the wt and qtbinaries, I also excluded their source files with the same name (up to the .cpp or .h ending). If you desire to run the examples, just grab these examples files from the SVN repo at R-Forge.

All changes since the last release are summarized below:

0.2.5   2011-12-07

   o    Applied (somewhat simplified) patch by James Bates which restores
        RInside to working on Windows -- with a big Thank You! to James for
        fixing a long-standing bug we inadvertendly introduced right after
        0.2.0 almost two years ago

   o    New example embedding R inside a Wt (aka Webtoolkit, pronounced 
        'witty') application, mirroring the previous Qt application

   o    Qt example qtdensity now uses the new svg() device in base R; removed
        test for cairoDevice package as well as fallback png code

   o    Very minor fix to qmake.pro file for Qt app correcting link order

CRANberries also provides a short report with changes from the previous release. More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.

/code/rinside | permanent link

Mon, 25 Apr 2011

RInside 0.2.4

After several months, it was time for a new release 0.2.4 of RInside which is now on CRAN. RInside is a set of convenience classes which facilitate embedding of R inside of C++ applications and programs, using the classes and functions provided by the Rcpp R and C++ integration package.

This new release contains a few small internal changes to the initialization code, as well as a number of slightly improved examples employing more of the simplifications which Rcpp offers. Also included is a brand new example embedding R inside of the Qt framework; an earlier blog post had already discussed this example. Two more examples were added to the standard/examples directory which now contains fourteen plus two tests. We also added a NEWS file, the entry for this release is below.

0.2.4   2011-04-24

   o    Minor code cleanups in initialization code 

   o    New example embedding R inside a Qt application, along with pro file
        for Qt's qmake providing a complete simple C++ GUI application

   o    New examples rinside_sample{10,11} based on questions on the
        r-help and r-devel mailing list

   o    Some improvements and simplifications throughout examples/standard 
        as well as examples/mpi/

   o    Added this NEWS files -- with entries below summarised from ChangeLog
        and the corresponding blog posts

And courtesy of CRANberries, here are the changes from the previous release.
RInside-0.2.3/RInside/inst/ChangeLog |only RInside-0.2.3/RInside/libRInside.a |only RInside-0.2.4/RInside/ChangeLog |only RInside-0.2.4/RInside/DESCRIPTION | 24 ++++-- RInside-0.2.4/RInside/R/RInsidePaths.R | 4 - RInside-0.2.4/RInside/doxyfile | 8 +- RInside-0.2.4/RInside/inst/NEWS |only RInside-0.2.4/RInside/inst/THANKS | 1 RInside-0.2.4/RInside/inst/examples/mpi/rinside_mpi_sample0.cpp | 10 +- RInside-0.2.4/RInside/inst/examples/mpi/rinside_mpi_sample1.cpp | 11 +-- RInside-0.2.4/RInside/inst/examples/mpi/rinside_mpi_sample2.cpp | 10 +- RInside-0.2.4/RInside/inst/examples/mpi/rinside_mpi_sample3.cpp | 9 -- RInside-0.2.4/RInside/inst/examples/qt |only RInside-0.2.4/RInside/inst/examples/standard/rinside_sample1.cpp | 30 ++++---- RInside-0.2.4/RInside/inst/examples/standard/rinside_sample10.cpp |only RInside-0.2.4/RInside/inst/examples/standard/rinside_sample11.cpp |only RInside-0.2.4/RInside/inst/examples/standard/rinside_sample2.cpp | 15 +--- RInside-0.2.4/RInside/inst/examples/standard/rinside_sample3.cpp | 6 - RInside-0.2.4/RInside/inst/examples/standard/rinside_sample5.cpp | 10 +- RInside-0.2.4/RInside/inst/examples/standard/rinside_sample6.cpp | 12 +-- RInside-0.2.4/RInside/inst/examples/standard/rinside_sample7.cpp | 9 -- RInside-0.2.4/RInside/inst/examples/standard/rinside_sample9.cpp | 2 RInside-0.2.4/RInside/inst/include/RInsideAutoloads.h | 35 ++++++++-- RInside-0.2.4/RInside/inst/include/RInsideEnvVars.h | 13 +-- RInside-0.2.4/RInside/src/Makevars | 2 RInside-0.2.4/RInside/src/RInside.cpp | 21 +++--- 26 files changed, 121 insertions(+), 111 deletions(-)

More information is on the RInside page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

/code/rinside | permanent link

Fri, 06 Aug 2010

RInside release 0.2.3

A new 0.2.3 release of RInside is now on CRAN. RInside is a set of convenience classes which facilitate embedding of R inside of C++ applications and programs. RInside works particularly well with Rcpp and now depends on it.

This is the first release since March when we released 0.2.2. A few things got added to Rcpp in the meantime, and RInside is taking advantage of some of these as illustrated in several of the included examples.

More details and the changelog are on the RInside page which also leads

/code/rinside | permanent link

Mon, 22 Mar 2010

RInside release 0.2.2

The shiny new 0.2.2 release of RInside has just been uploaded to CRAN; it should hit mirrors tommorow. Sources are also at my RInside page.

RInside is a set of convenience classes to facilitate embedding of R inside of C++ applications. It works particularly well with Rcpp and now depends on it.

This is the first release since version 0.2.1 in early January. Romain and I made numerous changes to Rcpp in the meantime. With this release, RInside is starting to catch up by taking advantage of many new automatic (templated) type converters. We have updated the existing examples, and added several new ones. These are all visibile directly via the Doxygen-generated documentation under the Files heading. Two examples are also shown directly on the RInside page.

Also added are new examples showing how to use RInside to embed R inside C++ applications using MPI for parallel computing. This was contributed via two examples files by Jianping Hua, and we reworked the examples slightly (and added two variants that use MPI's C++ API).

As it is so short, here is the basic 'Hello, World' example now showing the simpler Rcpp-based variable assignment:

// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4;  tab-width: 8; -*-
//
// Simple example showing how to do the standard 'hello, world' using embedded R
//
// Copyright (C) 2009 Dirk Eddelbuettel
// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
//
// GPL'ed

#include <RInside.h>                    // for the embedded R via RInside

int main(int argc, char *argv[]) {

    RInside R(argc, argv);              // create an embedded R instance

    R["txt"] = "Hello, world!\n";	// assign a char* (string) to 'txt'

    R.parseEvalQ("cat(txt)");           // eval the init string, ignoring any returns

    exit(0);
}

One minor setback is that the examples currently segfault on Windows. That may be an issue with linking and class instantiation or something related. Romain and I focus much more on Linux and OS X, so this has not gotten a lot of attention. Debugging help would be appreciated.

/code/rinside | permanent link