有没有将 R 集成到 ruby 中的库?
我最近研究了 Windows 7 上 ruby 和 R 之间的集成。到目前为止,当我运行脚本时,rinruby 会挂起(在我的 Windows7 计算机上)。现在我从 这篇文章 中了解到,rsruby 没有完全可以在 Windows 上工作。有人知道可以使用的图书馆吗?
I recently investigate a integration between ruby and R on Windows 7. So far, rinruby hangs (on my Windows7 machine) when I run a script. Now I learn from this post that rsruby does not work on Windows at all. Does anybody know a library that would work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
让我先说一下,我更像是一个 Linux 人,而不是 Windows 人……但在某些时候,操作系统的功能确实很重要,就像它们对基本 POSIX 功能的支持等一样。
因此,它可能不是一个将 R 嵌入 Ruby 或将其链接到 Windows 上是小菜一碟,这对您来说可能很方便。 R 毕竟依赖于 Windows 上的 MinGW 工具链。
作为替代方案,请考虑优秀的 Rserve——我刚刚注意到一个看似新的后代 RserveWin Simon 现在也提供了。只需要在某个地方运行,然后您就可以通过 tcp/ip 进行连接。有 C/C++ 和 Java 的示例客户端,以及其他项目,例如 pyRserve 和这个 Rserve-Ruby-client 可能符合要求。
编辑 再一次 Google 搜索也会导致 关于 R / Ruby 集成的讨论,它指的是 RSRruby gem 但是(根据另一个快速搜索)在 Windows 上似乎也存在问题。也许预订和转机确实是您最好的门票。
Let me prefix this by saying that I am more of a Linux person than a Windows person ... but at some point the capabilities of the OSs do matter, as does their support for basic POSIX functionality etc.
Hence, it may not be a piece of cake to embed R into Ruby or link it on Windows, as handy as this may be for you. R is after all dependent on the MinGW toolchain on Windows.
As an alternative, consider the excellent Rserve---and I just noticed a seemingly new offspring RserveWin Simon now also provides. This merely needs to run somewhere, and you can then connect over tcp/ip. There are example clients for C/C++ and Java, and other projects such as for example pyRserve and this Rserve-Ruby-client which may fit the bill.
Edit One more Google search also leads to this talk about R / Ruby integration which refers to the RSRruby gem but that (according to another quick search) seems to have issue on Windows too. Maybe Rserve and a connection really is your best ticket.
如果您能够在 JRuby 下运行,那么您也许能够使用基于 Java 的 R 桥。
我目前使用 RSRuby 将 R 与 Rails 应用程序(在 OSX 上运行)集成,但我希望切换到独立的 R服务器很快。
If you are able to run under JRuby then you may be able to use a Java-based bridge to R.
I currently use RSRuby to integrate R with a Rails application (running on OSX) but I am looking to switch to having a standalone R server shortly.