Eloi Ribeiro wrote:
> Hello again Peter.
> 
> I noticed that I didn't had Numeric installed, now that part is solved, 
> but it didn't solve the problem.
> 
> I still get a list of lists not an array:
> 
>  >>> c1=[386,385,383]
>  >>> c2=[113,117,117]
>  >>> c=r.cbind(c1,c2)
>  >>> c
> [[386, 113], [385, 117], [383, 117]]

That is odd.  Possibly an rpy problem - hopefully someone else can 
comment on this bit.

The work around is to create the array yourself explicitly.  This works 
for me:

 >>> from rpy import *
 >>> import Numeric
 >>> c = Numeric.array([[386, 113], [385, 117], [383, 117]])
 >>> c
array([[386, 113],
        [385, 117],
        [383, 117]])
 >>> r.chisq_test(c)["p.value"]
0.9535284154083411

But it sounds like you tried something like this already...
> 
> I get the same error trying this:
> 
>  >>> r.chisq_test(array(c))
> 

In python, what does this print?
 >>> array(c)

Peter


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to