Passing RInside's 'R' instance as a parameter between classes/methods

邮差的信 提交于 2019-12-04 12:09:54

Yes, and as I wrote earlier to the rcpp-devel list (which you should follow if you care about Rcpp and RInside) I just added an example to RInside which embeds it inside Qt.

I instantiante R in main() and then pass a reference to this object to the class using it. That seems like a proper model as we need to make sure that only one R instance is running (with R not being multithreaded etc---if you need more instances, consider Rserve.

This example is now in SVN and looks like this on my box:

I quite like it as it lets you play around with mixtures, spread the central location of both draws etc and see at which bandwidth you no longer differentiate between two humps of the estimated density.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!