Coder Social home page Coder Social logo

rinside's Introduction

RInside: Easy embedding of R inside C++ (and C)

Build Status License CRAN Dependencies Debian package Downloads Last Commit

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 nine 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, and (since release 0.2.16) a simple (and more limited) interface for embedding insice C applications.

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, Romain Francois, and Lance Bachmeier

License

GPL (>= 2)

rinside's People

Contributors

cauthmann avatar eddelbuettel avatar ellert avatar fradav avatar jeroen avatar jonathon-love avatar kevinushey avatar llaniewski avatar mirca avatar paberline avatar romainfrancois avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.