> Yes you are quite correct. In the basic (default) conversion mode > vectors of length one are converted to Ruby primitives. However, in > the 'vector' conversion mode an Array of length one is returned > instead (closer to R semantics). E.g. > > irb(main):001:0> require 'rsruby' > => true > irb(main):002:0> r = RSRuby.instance > => #<RSRuby:0xb7d11220> > irb(main):003:0> r.sum(1,2,3).class > => Fixnum > irb(main):004:0> RSRuby.set_default_mode(RSRuby::VECTOR_CONVERSION) > => 1 > irb(main):005:0> r.sum(1,2,3).class > => Array That seems a fair comprise to me, especially given that the precise R semantics aren't well defined due to the default operation of [ to drop dimensions of size 1. > > I think a better mapping would be to Ara's ArrayFields class. Lists > > in R can be accessed by name or by position. > > I tentatively agree. My goal for this release was to implement the > RPy conversion routines and test suite as faithfully as possible. In > RPy named lists/vectors are converted to Python Dictionaries which > are (exactly?) equivalent to Ruby Hashes so I kept to that scheme. That's a very reasonable goal. RSRuby really does look great and I'll look forward to being able to use R from within ruby. Hadley