Dirk Eddelbuettel Thinking inside the box
 
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