0

I'm not able to find a way to extract list element by name after reading the manual and searching stackoverflow. What I end up with is the following way to extract the p.value. But it is better to extract the element by the name 'p.value' so that the code is more readable. I'm told that there is a way to do so, but I can't find it. Could anybody show me how to do it? Thanks!

import rpy2.robjects as robjects
kstest=robjects.r['ks.test']

x=robjects.IntVector([1, 2, 3, 4, 5])
y=robjects.IntVector([11, 12, 13, 14, 15])

result=kstest(x, y)
print result[1][0]
user1424739
  • 11,937
  • 17
  • 63
  • 152

1 Answers1

0

rpy2 documenation -> vectors -> extracting items

lgautier
  • 11,363
  • 29
  • 42