Movatterモバイル変換


[0]ホーム

URL:


Dirk Eddelbuettel

RInside: Easyembedding of R inside C++ (and C)

Build StatusLicenseCRANDependenciesDebian packageDownloadsLast Commit

About

The RInside package provides a few classes for seamless embedding ofR inside of C++ applications byrelying onRcpp.

Examples

Provided with the package itself are nine subdirectories withexamples: from more than a dozen basic command-line examples (indirectorystandard) to graphical user-interfaces (usingbothQt andWt), linear algebra withArmadillo andEigen,parallel computing with MPI to a sandboxed server, and (since release0.2.16) a simple (and more limited) interface for embedding insice Capplications.

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

#include<RInside.h>// for the embedded R via RInsideint 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);}

TheQtexample 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, theWtexample directory contains this C++-based web application doing thesame:

See Also

TheRInside webpage has some more details.

Authors

Dirk Eddelbuettel, Romain Francois, and Lance Bachmeier

License

GPL (>= 2)

Initially created: Mon Feb 09 21:29:54 CST 2009
Last modified: Sun May 26 10:25:40 CDT 2024


[8]
ページ先頭

©2009-2025 Movatter.jp