## RInside: Easy embedding of R inside C++ (and C)
[![Build Status](https://travis-ci.org/eddelbuettel/rinside.svg)](https://travis-ci.org/eddelbuettel/rinside)
[![CI](https://github.com/eddelbuettel/rinside/workflows/ci/badge.svg)](https://github.com/eddelbuettel/rinside/actions?query=workflow%3Aci)
[![License](http://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN](http://www.r-pkg.org/badges/version/RInside)](https://cran.r-project.org/package=RInside)
[![Dependencies](https://tinyverse.netlify.com/badge/RInside)](https://cran.r-project.org/package=RInside)
[![Debian package](https://img.shields.io/debian/v/r-cran-rinside/sid?color=brightgreen)](https://packages.debian.org/sid/r-cran-rinside)
[![Downloads](http://cranlogs.r-pkg.org/badges/RInside?color=brightgreen)](https://cran.r-project.org/package=RInside)
[![Last Commit](https://img.shields.io/github/last-commit/eddelbuettel/rinside)](https://github.com/eddelbuettel/rinside)
### About
The RInside package provides a few classes for seamless embedding of [R](https://www.r-project.org) inside of
C++ applications by relying on [Rcpp](http://www.rcpp.org).
### 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](http://www.qt.io) and [Wt](http://www.webtoolkit.eu/wt)), linear algebra with
[Armadillo](http://arma.sf.net) and [Eigen](http://eigen.tuxfamily.org/index.php?title=Main_Page), 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](inst/examples/standard/rinside_sample0.cpp)
```c++
#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](https://github.com/eddelbuettel/rinside/tree/master/inst/examples/qt) produces
this application for showing how to use R (to estimate densities) inside a C++ executable (providing the GUI):
![](https://github.com/eddelbuettel/rinside/blob/master/local/qtdensitySVG.png)
The code is portable across operating systems. Similar, the
[Wt example directory](https://github.com/eddelbuettel/rinside/tree/master/inst/examples/wt)
contains this C++-based web application doing the same:
![](https://github.com/eddelbuettel/rinside/blob/master/local/wtdensity.png)
### See Also
The [RInside](http://dirk.eddelbuettel.com/code/rinside.html) web page has
some more details.
### Authors
Dirk Eddelbuettel, Romain Francois, and Lance Bachmeier
### License
GPL (>= 2)
没有合适的资源?快使用搜索试试~ 我知道了~
rinside:R在C ++程序中的无缝嵌入
共129个文件
cpp:55个
h:21个
gnumakefile:8个
需积分: 35 7 下载量 134 浏览量
2021-02-05
15:05:29
上传
评论
收藏 295KB ZIP 举报
温馨提示
RInside:轻松将R嵌入到C ++(和C)中 关于 RInside包通过依赖提供了一些用于将无缝嵌入C ++应用程序的。 例子 软件包本身提供了9个带有示例的子目录:从十几个基本命令行示例(在目录standard )到图形用户界面(使用和 ),带有和线性代数,带有MPI的并行计算到沙盒服务器,以及(自0.2.16版本起)一个简单的(且受限制的)接口来嵌入ins C应用程序。 最简单的示例(以其标头为模)是 # include < RInside> // for the embedded R via RInside int main ( int
资源详情
资源评论
资源推荐
收起资源包目录
rinside:R在C ++程序中的无缝嵌入 (129个子文件)
setenv.c 2KB
passdata.c 329B
hello.c 121B
ChangeLog 29KB
cleanup 347B
RInside.cpp 16KB
example_server.cpp 8KB
wtdensity.cpp 8KB
wtdensityPlain.cpp 8KB
example_client.cpp 7KB
rinsideserver.cpp 7KB
qtdensity.cpp 6KB
rinside_interactive0.cpp 6KB
rinside_sample17.cpp 6KB
binarystream.cpp 4KB
rinsideclient.cpp 3KB
rinside_mpi_sample4.cpp 3KB
rinside_mpi_sample1.cpp 3KB
rinside_mpi_sample3.cpp 3KB
rinside_test1.cpp 3KB
rinside_sample16.cpp 3KB
rinside_sample4.cpp 2KB
rinside_sample3.cpp 2KB
MemBuf.cpp 1KB
RInside_C.cpp 1KB
rinside_callbacks1.cpp 1KB
rinside_sample6.cpp 1KB
rinside_sample1.cpp 1KB
rinside_sample2.cpp 1KB
rinside_sample14.cpp 1KB
rinside_mpi_sample0.cpp 1KB
rinside_sample10.cpp 1KB
rinside_sample13.cpp 1KB
rinside_mpi_sample2.cpp 1KB
rinside_sample5.cpp 1KB
rinside_module_sample0.cpp 1KB
rinside_sample11.cpp 1KB
rinside_test0.cpp 1KB
rinside_sample15.cpp 1KB
boostEx.cpp 1KB
rinside_eigen1.cpp 984B
rinside_sample7.cpp 979B
rinside_arma1.cpp 975B
rinside_sample9.cpp 862B
rinside_sample12.cpp 855B
rinside_sample8.cpp 839B
rinside_issue178.cpp 793B
RcppExports.cpp 676B
rinside_arma0.cpp 655B
rinside_eigen0.cpp 646B
rinside_sample0.cpp 638B
rinside_callbacks0.cpp 580B
rinside_test2.cpp 531B
main.cpp 518B
foo.cpp 442B
rinside_slava.cpp 440B
rinside_axionator.cpp 409B
bar.cpp 371B
compiler.cpp 366B
rinside_vertica.cpp 243B
wtdensity.css 330B
DESCRIPTION 2KB
doxyfile 67KB
.editorconfig 437B
.gitignore 67B
GNUmakefile 3KB
GNUmakefile 2KB
GNUmakefile 2KB
GNUmakefile 2KB
GNUmakefile 2KB
GNUmakefile 2KB
GNUmakefile 2KB
GNUmakefile 672B
binarystream.h 6KB
typeid.h 4KB
RInside.h 3KB
callback_helper.h 3KB
internalfunction_clone.h 3KB
rinsideclient.h 3KB
Callbacks.h 2KB
rinsideserver.h 2KB
RInsideCommon.h 2KB
qtdensity.h 1KB
rinside_callbacks.h 1KB
MemBuf.h 1KB
constants.h 1KB
RInside_C.h 1KB
RInsideConfig.h 975B
bar.h 756B
foo.h 715B
foo_rcpp_wrapper_definitions.h 605B
bar_rcpp_wrapper_definitions.h 503B
bar_rcpp_wrapper_declarations.h 124B
foo_rcpp_wrapper_declarations.h 122B
Makevars 2KB
README.md 3KB
NAMESPACE 67B
wtdensity.png 78KB
qtdensitySVG.png 68KB
qtdensity.pro 2KB
共 129 条
- 1
- 2
Airva128
- 粉丝: 22
- 资源: 4670
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0