简体   繁体   English

Rpp,Rinside支持R包?

[英]Rpp, Rinside support for R packages?

Does anyone have decent insight on certain R packages that can work with RInside out of box? 有没有人对某些可以与rnside开箱即用的R套件有相当的洞察力? I am looking for hopeful support with the R packages of: quantstrat, quantmod, PerformanceAnalytics, and TTR In other words, can I call R functions directly within these R packages listed from my C++ if I used RInside. 我正在寻找对R包的有希望的支持:quantstrat,quantmod,PerformanceAnalytics和TTR换句话说,如果我使用了rnside,我可以直接在我的C ++列出的这些R包中调用R函数。 If not, do I have extra coding or tweaking on the packages or my own R/C++ code to properly implement? 如果没有,我是否需要对软件包或我自己的R / C ++代码进行额外的编码或调整才能正确实现? Big thanks 太谢谢了

You do understand that RInside calling R code still calls R code , right? 你知道RInside调用R代码仍然调用R代码 ,对吧?

There is no magic speed gain by simply replacing your interactive prompt, or R script, with a call from a C++ program wrapping around it. 通过简单地用C ++程序调用来替换你的交互式提示符或R脚本,就没有神奇的速度提升。

For concrete examples, see examples/standard/rinside_sample2.cpp and examples/standard/rinside_sample4.cpp both of which call the fPortfolio package (in response to similar questions for examples). 有关具体示例,请参阅examples/standard/rinside_sample2.cppexamples/standard/rinside_sample4.cpp ,它们都调用fPortfolio包(作为回答类似问题的示例)。 And no, they don't solve the problem faster, but they may give C++ programmers easy access to some R functionality. 不,它们不能更快地解决问题,但它们可以让C ++程序员轻松访问某些R功能。

The package comes with a large set of examples. 该软件包附带了大量示例。 Feel free to experiment with those, and maybe time or profile them. 随意尝试这些,也许时间或描述它们。 But no silver bullet... 但没有银弹......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM