[Rpy] rpy2 error when loading 'oligo?

2009-09-27 Thread Peng Yu
Hi, My rpy2 is of version 2.0.7. I got the following error when I load 'oligo'. Can somebody let me know how to fix the problem? Regards, Peng >>> from rpy2.robjects import r >>> r.library('oligo') Loading required package: oligoClasses Loading required package: Biobase Welcome to Bioconductor

Re: [Rpy] rpy2 error when loading 'oligo?

2009-09-27 Thread Peng Yu
On Sun, Sep 27, 2009 at 7:48 AM, Sean Davis wrote: > On Sun, Sep 27, 2009 at 8:10 AM, Peng Yu wrote: >> Hi, >> >> My rpy2 is of version 2.0.7. >> >> I got the following error when I load 'oligo'. Can somebody let me >> know how to fix the p

[Rpy] Why rpy.r.t is not working

2009-09-27 Thread Peng Yu
Hi, I'm not sure why transposing a matrix is not working. Can somebody let me know what is going on here? >>> rpy.r.matrix(range(6),nr=2) [[0, 2, 4], [1, 3, 5]] >>> rpy.r.t(rpy.r.matrix(range(6),nr=2)) [[0, 2, 4], [1, 3, 5]] Regards, Peng

[Rpy] Why I can not plot a matrix?

2009-09-28 Thread Peng Yu
Hi, In R, I can plot a 2 column matrix > x=1:3 > y=1:3 > plot(x,y) > plot(cbind(x,y)) But I'm wondering why I can not do so with rpy. In the following python code, the last line does not work. Can somebody let me know why? import rpy x = [1, 2, 3] y = [1, 2, 3] rpy.r.plot(x, y) l = [ [1, 2, 3]

[Rpy] Fwd: [Numpy-discussion] setup.py does not use the correct library

2009-09-28 Thread Peng Yu
On Mon, Sep 28, 2009 at 4:44 PM, Robert Kern wrote: > On Mon, Sep 28, 2009 at 16:40, Peng Yu wrote: >> I attached the script that I run for build and the build output. I >> think that setup.py doesn't use the correct python library. But I'm >> not sure why. Woul

Re: [Rpy] Why rpy.r.t is not working

2009-09-28 Thread Peng Yu
transpose function. > > The easiest solution is to turn off automatic conversion, and then > manually ask for conversion when you want it: > >>>> import rpy >>>> rpy.set_default_mode(rpy.NO_CONVERSION) >>>> x = rpy.r.t(rpy.r.matrix(range(6),nr=2)) &g

Re: [Rpy] Why I can not plot a matrix?

2009-09-29 Thread Peng Yu
On Mon, Sep 28, 2009 at 4:57 PM, Peng Yu wrote: > Hi, > > In R, I can plot a 2 column matrix >> x=1:3 >> y=1:3 >> plot(x,y) >> plot(cbind(x,y)) > > But I'm wondering why I can not do so with rpy. In the following > python code, the last lin

[Rpy] How rpy2 is better than rpy?

2009-10-18 Thread Peng Yu
Since rpy2 is a redesign of rpy, I suppose that rpy2 is better than rpy in certain aspects. But I don't see where this is described in the document. Could somebody let me know how rpy2 is better than rpy? Thank you! -- Com

[Rpy] What is the usage of '*' and '**' in 'r.plot(*args, **kwargs)'?

2009-12-15 Thread Peng Yu
I see 'r.plot(*args, **kwargs)' on http://rpy.sourceforge.net/rpy2/doc/html/introduction.html I don't understand what '*' and '**' mean. Could somebody let me know? -- Return on Information: Google Enterprise Search pays

Re: [Rpy] What is the usage of '*' and '**' in 'r.plot(*args, **kwargs)'?

2009-12-15 Thread Peng Yu
On Wed, Dec 16, 2009 at 10:19 AM, Mark Larsen wrote: >> I don't understand what '*' and '**' mean. Could somebody let me know? > > This is a python thing.  '*' means that any number of arguments can be > passed as a tuple. > > For instance, I have function: > > def add(a,b): >  return a+b > > I co

Re: [Rpy] What is the usage of '*' and '**' in 'r.plot(*args, **kwargs)'?

2009-12-15 Thread Peng Yu
On Wed, Dec 16, 2009 at 12:37 PM, Laurent Gautier wrote: > On 12/15/09 6:42 PM, Peng Yu wrote: >> >> On Wed, Dec 16, 2009 at 10:19 AM, Mark Larsen  wrote: >>>> >>>> I don't understand what '*' and '**' mean. Could somebody let me kno