writing VBA code to call R script

我的梦境 提交于 2019-12-08 13:01:52

问题


I've downloaded and installed Rconn as well as Rexcel. The API appears to be working as I am able to copy my code from R into Excel and then, through the use of the API GUI I am able to extract values for one of my matrices.

The problem I'm having is within VBA. When I try and run the following line: RInterface.StartRServer I get the following error message: "Run-time error'424': Object required"

Would anyone be able to help me understand why I'm getting this error? Am I perhaps meant to load something from "Tools/References"?

Any help would be greatly appreciated

Thanks

Mike


回答1:


I managed to sort it out. It was a reference problem. Once the rconn and RExcel are install you have to go to tools>References>RExcelVBAlib.

This will then allow you to use RExcel within VBA



来源:https://stackoverflow.com/questions/19091746/writing-vba-code-to-call-r-script

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