R Statistical Package Gem For A Rails Application
Asked Answered
E

1

14

I'm looking to integrate the R Statistical package into my rails application. My research has uncovered RSRuby, RinRuby and the Rserve Ruby client. It would be great to get some feedback from those of you who have you used these or other options and to get a better ideas of the pluses and minuses of each option. I have also heard Gauss is an alternative, but I am not aware of any ruby interfaces at this point.

My primary applications will be multinomial logit and probit models. If that's helpful.

Thanks in advance for your input.

Endo answered 15/2, 2012 at 2:53 Comment(1)
Similar question with relevant answers: https://mcmap.net/q/671653/-integrating-r-with-rsrubyLocoism
K
11

RSRuby takes the approach of embedding the R interpreter into Ruby as a C extension. It only works on specific versions of ruby, so if you are using JRuby or Rubinius this is not really an option for you. It is definitely the fastest, although some class conversions get a little weird.

RinRuby and Rserve Ruby both use TCP/IP sockets, although Rserve claims to be 5-10 times faster.

I would giving RSRuby a try, and if you encounter problems with your ruby version or such, switching to Rserve. I am not familiar with Gauss.

Heads up- as far as I know, none of these solutions support multi threading, largely because R doesn't play nice with other instances of itself.

Kynthia answered 14/3, 2012 at 19:37 Comment(2)
Rserve does allow for multiple connections to R, allowing you to run several concurrent operations. I'm not sure if R can multithreading though.Scathing
Which versions of ruby is RSRuby compatible with?Molokai

© 2022 - 2024 — McMap. All rights reserved.