RInside v0.2.15

0

Monthly downloads

0th

Percentile

C++ Classes to Embed R in C++ Applications

C++ classes to embed R in C++ applications A C++ class providing the R interpreter is offered by this package making it easier to have "R inside" your C++ application. As R itself is embedded into your application, a shared library build of R is required. This works on Linux, OS X and even on Windows provided you use the same tools used to build R itself. d Numerous examples are provided in the eight subdirectories of the examples/ directory of the installed package: standard, 'mpi' (for parallel computing), 'qt' (showing how to embed 'RInside' inside a Qt GUI application), 'wt' (showing how to build a "web-application" using the Wt toolkit), 'armadillo' (for 'RInside' use with 'RcppArmadillo') and 'eigen' (for 'RInside' use with 'RcppEigen'). The examples use 'GNUmakefile(s)' with GNU extensions, so a GNU make is required (and will use the 'GNUmakefile' automatically). 'Doxygen'-generated documentation of the C++ classes is available at the 'RInside' website as well.

Readme

RInside Build Status License CRAN Dependencies Downloads

Easy embedding of R inside C++

About

The RInside package provides a few classes for seamless embedding of R inside of C++ applications by relying on Rcpp.

Examples

Provided with the package itself are eight subdirectories with examples: from more than a dozen basic command-line examples (in directory standard) to graphical user-interfaces (using both Qt and Wt), linear algebra with Armadillo and Eigen, parallel computing with MPI to a sandboxed server.

The simplest example (modulo its header) is examples/standard/rinside_sample0.cpp

#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);
}

The Qt example directory produces this application for showing how to use R (to estimate densities) inside a C++ executable (providing the GUI):

The code is portable across operating systems. Similar, the Wt example directory contains this C++-based web application doing the same:

See Also

The RInside web page has some more details.

Authors

Dirk Eddelbuettel and Romain Francois

License

GPL (>= 2)

Functions in RInside

Name Description
RInside-package Embedding R in C++ applications
No Results!

Last month downloads

Details

Date 2019-03-06
LinkingTo Rcpp
URL http://dirk.eddelbuettel.com/code/rinside.html
License GPL (>= 2)
BugReports https://github.com/eddelbuettel/rinside/issues
MailingList Please send questions and comments regarding RInside to rcpp-devel@lists.r-forge.r-project.org
NeedsCompilation yes
Packaged 2019-03-06 12:59:17.136291 UTC; edd
Repository CRAN
Date/Publication 2019-03-06 15:32:49 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/RInside)](http://www.rdocumentation.org/packages/RInside)