将 R 脚本编译成独立的 .exe 文件? [英] Compile R script into standalone .exe file?

查看:143
本文介绍了将 R 脚本编译成独立的 .exe 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么简单的方法可以像 matlab 那样将我的 R 脚本编译成独立的 .exe 文件?

Is there any easy way to compile my R script into standalone .exe file just like what matlab does?

推荐答案

事实上,有一种方法可以实现满足您要求的解决方案.查看关于部署 Desktop Apps with R 的文章在 R 博客上.正如文章中详述的那样,您最终将使用比单个 exe 文件更多的东西.

As a matter of fact there is a way to achieve solution that would meet your requirements. Have a look at the article on Deploying Desktop Apps with R on R-Bloggers. As detailed in the article, you will end up using a few more things than a single exe file.

另外,我想提请您注意 RGtk2 使用 RGtk2 你可以尝试在 R 中开发你自己的界面.如果推来推去,我相信你可以打包你的 R将 R 的可移植版本和依赖项一起编码到一个安装程序中,然后从中生成 make 和 app,这会产生单个 exe 文件的错觉.

Also I would like to draw your attention to the RGtk2 with use of the RGtk2 you could attempt to develop your own interface in R. If push comes to shove, I trust that you could pack your R code together with a portable version of R and dependencies into one installer and make and app from that, that would create an illusion of a single exe file.

在您的问题中,您询问了开发解释 R 代码的独立可执行文件是否容易.我不会说这很容易.如果您强烈希望从应用程序运行 R 代码,您可以使用 RCaller 用于 Java 或 R.NET.

In your question you asked whether it's easy to develop a standalone executable file interpreting R code. I wouldn't say it's easy. If you have a strong desire to run a R code from an application, you could do it in a simpler manner using RCaller for Java or R.NET.

这篇关于将 R 脚本编译成独立的 .exe 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆