Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Seamless embedding of R in C++ programs

NotificationsYou must be signed in to change notification settings

eddelbuettel/rinside

Repository files navigation

CILicenseCRANDependenciesDebian packageDownloadsLast Commit

About

The RInside package provides a few classes for seamless embedding ofR inside ofC++ applications by relying onRcpp.

Examples

Provided with the package itself are nine subdirectories with examples: from more than a dozen basic command-line examples (in directorystandard) to graphical user-interfaces (using bothQt and Wt), linear algebra withArmadillo andEigen, parallel computing with MPI to asandboxed server, and (since release 0.2.16) a simple (and more limited) interface for embedding insice C applications.

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

#include<RInside.h>// for the embedded R via RInsideintmain(int argc,char *argv[]) {    RInsideR(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 returnsexit(0);}

TheQt example directory producesthis 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, theWt example directorycontains this C++-based web application doing the same:

See Also

TheRInside web page hassome more details.

Authors

Dirk Eddelbuettel, Romain Francois, and Lance Bachmeier

License

GPL (>= 2)

About

Seamless embedding of R in C++ programs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors13


[8]ページ先頭

©2009-2025 Movatter.jp