rinruby论文只显示发送给R的非常简单的数据类型。这是否意味着如果我想在R中使用Ruby矩阵,我必须将它传递给R vector for vector并将它们粘合到一起R?
中的矩阵答案 0 :(得分:1)
看来他们不能。
基于http://www.jstatsoft.org/v29/i04/paper,只能从Ruby为R分配简单的标量和一维数组。
无论如何我尝试了一系列数组并得到了这个结果:
RuntimeError: Unsupported data type on Ruby's end
from /Library/Ruby/Gems/2.0.0/gems/rinruby-2.0.3/lib/rinruby.rb:656:in `rescue in assign_engine'
from /Library/Ruby/Gems/2.0.0/gems/rinruby-2.0.3/lib/rinruby.rb:635:in `assign_engine'
from /Library/Ruby/Gems/2.0.0/gems/rinruby-2.0.3/lib/rinruby.rb:405:in `assign'
from /Library/Ruby/Gems/2.0.0/gems/rinruby-2.0.3/lib/rinruby.rb:359:in `method_missing'
from (irb):1
from /usr/bin/irb:12:in `<main>'