[Rpy] rpy2 vector length limitation?

2009-04-09 Thread Joel Neilson
Hi all Newbie question. I've generated a very simple script to process gene expression data from mysql output. One of the things I'm trying to do is feed vectors that I generate in this script into a wilcoxon test through rpy2, and collecting the p value as output. Some of the vectors are

Re: [Rpy] Anova example

2009-04-09 Thread Warnes, Gregory R.
R is complaining because you handed the 'oneway' function a single string parameter. Instead of oneway = robjects.r['oneway.test'] test = oneway("values ~ ind, data=d, var.equal=TRUE") try this: test = robjects.r['oneway.test(values ~ ind, data=d, var.equal=TRUE)'] or oneway = robjects.r[

Re: [Rpy] Anova example

2009-04-09 Thread Nathaniel Smith
On Thu, Apr 9, 2009 at 10:08 AM, Warnes, Gregory R. wrote: > Instead of >  oneway = robjects.r['oneway.test'] >  test = oneway("values ~ ind, data=d, var.equal=TRUE") > try this: >  test = robjects.r['oneway.test(values ~ ind, data=d, var.equal=TRUE)'] Typo: should use () here, not []: test = r

[Rpy] rpy2 Segmentation Fault Accessing List By Index

2009-04-09 Thread Mark Larsen
I have an R function that returns a list of Matrices and Vectors. I've been processing the return list like: rpyRV = rpy2.robjects.r.someFunc() for property,rObj in zip([i for i in rpyRV.getnames()],[i for i in rpyRV]): # do stuff with results On my development box (64 bit, dual XEON) everythi

Re: [Rpy] rpy2 Segmentation Fault Accessing List By Index

2009-04-09 Thread Mark Larsen
Sorry, forgot the backtrace --> (gdb) run test.py Starting program: /usr/bin/python test.py (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread 46912506825472 (LWP 7658)] [New Thread 1082132832 (LWP 7675)] [New Thread 1090525536 (LWP 7676)] Program received sign

Re: [Rpy] Anova example

2009-04-09 Thread Juls Night
Many thanks! I see now how this works. Best, Juls -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.s

[Rpy] factors and functions that expect them

2009-04-09 Thread David Warde-Farley
Hi all, I'm somewhat new to Rpy, and trying to use the R random forests package from Python, and depending on the type it receives for one variable it switches behaviour. If I want it to do classification it expects a "factor" for y, but I am at a loss for the easiest way to call convert a

Re: [Rpy] rpy2 Segmentation Fault Accessing List By Index

2009-04-09 Thread Mark Larsen
Hate to keep replying to my own message but... I thought I'd throw a newer version of R at this problem. My above errors are with 2.7.1 and I thought I'd test with 2.8.2 (my development box, where all works well is at 2.7.2). I kept my main 2.7.1 install in /usr/lib64 and installed 2.8.2 into /u

Re: [Rpy] factors and functions that expect them

2009-04-09 Thread laurent
With rpy2 (although there is currently no formal class for factors): import rpy2.robjects as ro vec = ro.StrVector(("a", "b", "a", "b")) vec = ro.r["factor"](vec) On Thu, 2009-04-09 at 19:38 -0400, David Warde-Farley wrote: > Hi all, > > I'm somewhat new to Rpy, and trying to use the R r

Re: [Rpy] Anova example

2009-04-09 Thread laurent
There is even more in the fine manual: http://rpy.sourceforge.net/rpy2/doc/html/introduction.html#linear-models http://rpy.sourceforge.net/rpy2/doc/html/robjects.html#formulae On Thu, 2009-04-09 at 21:10 +, Juls Night wrote: > Many thanks! > > I see now how this works. > > Best, > Juls >

Re: [Rpy] rpy2 Segmentation Fault Accessing List By Index

2009-04-09 Thread laurent
On Thu, 2009-04-09 at 15:59 -0400, Mark Larsen wrote: > I have an R function that returns a list of Matrices and Vectors. > > I've been processing the return list like: > > rpyRV = rpy2.robjects.r.someFunc() > for property,rObj in zip([i for i in rpyRV.getnames()],[i for i in > rpyRV]): > # d