1

I think I found an error in pyRserve but don't know where to report it.

When I use pyRserve I can get an R matrix in the expected way:

import pyRserve
con = pyRserve.connect(host = 'localhost') # this is a bug too in windows
testMatrix = con.r("matrix(rnorm(10), ncol=2)")

array([[ 1.01571435,  0.35465894],
   [-0.36201676, -0.21100438],
   [-3.05266506,  1.49179003],
   [ 0.27192553,  1.51428093],
   [ 1.45269568,  0.57196333]])

However, when I try to do the same thing with something that uses the data.matrix conversion I get this:

testMatrixConversion = con.r("data.matrix(iris)")
testMatrixConversion[1:10]
AttrArray([[ 5.4, 4.6, 5., 4.4, 4.9],
    [5.4,4.8,4.8,4.3,5.8],
...

It's getting the dimensions correct but is filling them by column instead of by row.

Anyone know how to fix this? Or at least how to report it to the developers?

Thanks; Kyle

Hong Ooi
  • 56,353
  • 13
  • 134
  • 187
Kyle
  • 401
  • 4
  • 10
  • Use pandas instead :) And pyRserve has a mailing list, which would be the way to contact them: http://groups.google.com/group/pyrserve – Karmel Jun 02 '12 at 01:42

0 Answers0