rinruby icon indicating copy to clipboard operation
rinruby copied to clipboard

Assigning large matrices

Open harrigan opened this issue 15 years ago • 6 comments

I am having trouble assigning large matrices.

require 'rinruby'
R.m = Matrix.zero 5

produces

...
rm(.RINRUBY.PARSE.STRING)
d=matrix(c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), 5, 5, TRUE)
print('RINRUBY.EVAL.FLAG')
...

which is fine but

require 'rinruby'
R.m = Matrix.zero 50

produces

...
rm(.RINRUBY.PARSE.STRING)
d=matrix(c(0,0,0,0,0 [snip] 0,0,0,0,0), 50, 50, TRUE)
print('RINRUBY.EVAL.FLAG')
Error: unexpected symbol in ",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
...

when using RinRuby 2.0.1, R 2.11.1, and Ruby 1.9.1p376 on Mac OS X 10.6.5.

harrigan avatar Nov 19 '10 08:11 harrigan

Bug confirmed. Working on it. Try using rserve-client...

clbustos avatar Nov 19 '10 16:11 clbustos

Thank you, no problem with rserve-client.

harrigan avatar Nov 22 '10 09:11 harrigan

Cool! Anyway, I will fix the bug.

clbustos avatar Nov 22 '10 14:11 clbustos

Was this bug ever fixed? Problem still seems to exist with matrices bigger than (approximately) 200 entries

klaffenboeck avatar Feb 27 '15 00:02 klaffenboeck

The problem is tricky, because is related to the way R creates sockets and ruby interacts with it. I focus my efforts on rserve-client, because allows a more faster and secure way to manage R.

clbustos avatar Mar 16 '15 14:03 clbustos

This issue may be solved with #30 , and can be closed.

fenrir-naru avatar Aug 19 '18 14:08 fenrir-naru