Hello Johnny,
Yes that definitely helped and now I am able to pass matrices as parameters to the function- I still have one more question though -
This is the way I do it -
require "rubygems"
require 'rsruby'
r = RSRuby.instance
r.library("concord")
r.matrix.autoconvert(RSRuby::NO_CONVERSION)
m = r.matrix([1,2,3,4],:nrow=>2,:ncol=>2)
puts r.is_matrix(m)
r.kripp_alpha(m)
Now the result it returns is of the form -
irb(main):009:0> r.kripp_alpha(m)
=> {"nmatchval"=>4.0, "data.level"=>"nominal", "coincidence.matrix"=>[[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [1.0, 1.0, 0.0]], "data.values"=>["2", "3", "4"], "statistic"=>-0.2}
The answer is the one in the 'statistic' variable. I would like to ask, how can I access this value in my rails application to display it?
Thanks !
|