I’d like to call R from a rails application. I already installed rsruby
and works fine with irb, but how do I call it from rails?
I have created config/evironments/rsruby_environment.rb like so:
R = RSRuby.instance
then added it to config/environments.rb:
Include your application configuration below
inserted in a controller like so:
r = R_Config::R @r_pnorm = r.pnorm(0.1)
and finally called in a view
<%= @r_pnorm %>
Is that correct? What is wrong?