Re: [Rpy] r.predict()

2008-02-22 Thread Gregory Warnes
The basic problem is that by default, RPy converts objects returned to python to a python object. Unfortunately, this conversion loses some information, including the type of the original R object. To avoid this conversion add two lines to your code: On Feb 22, 2008, at 12:36PM , marco hof

Re: [Rpy] package : survival

2008-02-28 Thread Gregory Warnes
The basic problem is that "survfit" is using deparse() to try to get the name of the Surv() object so it can generate an R formula. Unfortunately, this object doesn't have a name in R's namespace, so deparse() gets the structure representation instead of the name, and then things fail.

Re: [Rpy] Rpy handling kmeans

2008-02-28 Thread Gregory Warnes
Hello Ding, It appears that either you don't have numpy properly installed, or that your copy of rpy was compiled without numpy support. A simple workaround for this specific case would be to turn of conversion of r to python objects, so that the object 'x' remains an r matrix, rather than

Re: [Rpy] rpy crashes on graphics

2008-02-28 Thread Gregory Warnes
This bug should be corrected in the latest version of rpy. What version are you using? -G On Feb 28, 2008, at 10:39AM , Wacek Kusnierczyk wrote: > Hi, > > Having used rpy for just a while on Fedora 7, python 2.5, I discover > that it crashes on graphics functions such as plot, hist, etc. > >

Re: [Rpy] SF.net SVN: rpy: [411]trunk/sandbox/rpy_nextgen/rinterface/rinterface.c

2008-03-03 Thread Gregory Warnes
Wow, Laurent, you've been doing a lot of work! On Mar 2, 2008, at 2:52PM , <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > (there is something odd going on, with variable names > at the Python level suddenly pointing to nowhere - and > this often ends in a segfault :/ ) Probably R is garbage c

Re: [Rpy] read csv in python, and pass it on to R?

2008-04-01 Thread Gregory Warnes
You can pass the read data directly to R. Probably the best way to do this is to construct a python list containing one vector per column. Call as.data.frame() on the list, and then proceed. For example: from rpy import * set_default_mode(NO_CONVERSION) data = [ [

Re: [Rpy] Wiki for RPy Documentation?

2008-04-07 Thread Gregory Warnes
Hi All, I think it is a good idea to use a Wiki to help develop documentation. I've enabled Wiki support over at sourceforge for rpy at http://rpy.wiki.sourceforge.net/ but I don't have time to try to pull the existing documentation in there. Of course, patches against the existin

Re: [Rpy] change RHOME

2008-04-10 Thread Gregory Warnes
If you explicitly set the RHOME environment variable to point to the R 2.4.1 directory, rpy will use that RHOME and hence R 2.4.1. -Greg On Apr 10, 2008, at 5:53AM , Eloi Ribeiro wrote: Dear list, We are facing the fowling problem. Every thing worked fine while we had Python 2.4 + R 2.

Re: [Rpy] Error during wrapup: C stack usage is too close to thelimit

2008-04-10 Thread Gregory Warnes
Hi All, I'm sorry to hear that the C stack limit issue has arisen again. I'll check the source code to see if the fix that we put in for RC3 has gotten removed or disabled somehow. -Greg On Apr 9, 2008, at 2:44PM , Laurent Gautier wrote: I can reproduce it with python-2.5 / R-2.6.1 as

Re: [Rpy] Error during wrapup: C stack usage is too close tothelimit

2008-04-10 Thread Gregory Warnes
. -G On Apr 10, 2008, at 9:17AM , Gregory Warnes wrote: Hi All, I'm sorry to hear that the C stack limit issue has arisen again. I'll check the source code to see if the fix that we put in for RC3 has gotten removed or disabled somehow. -Greg On Apr 9, 2008, at 2:44PM , Laure

Re: [Rpy] installing rpy on a max running osx10.4

2008-04-16 Thread Gregory Warnes
Hi Mark I do my rpy development on OSX 10.4, using python 2.4.2. To install rpy, just download and unpack the source .tar.gz file, then run python setup.py build sudo python setup.py install you'll probably want to ensure that Numpy is installed before you do this so you

Re: [Rpy] making a data.frame with parameters in a fixed order

2008-04-29 Thread Gregory Warnes
Hello Andrew, The basic problem you are encountering is that python uses a dictionary to store named parameters to function calls. Python's dictionaries don't preserve order, just name-value correspondence. As a consequence calling an R function with named arguments loses the ordering.

Re: [Rpy] undefined symbol: KillAllDevices

2008-05-12 Thread Gregory Warnes
The fix for this bug has been submitted to SVN. -G On May 12, 2008, at 2:26PM , John Reid wrote: Well I seemed to have fixed it by changing the call to KillAllDevices() in rpymodule.c to Rf_KillAllDevices() as is defined in libR.so. Perhaps there's a better way? Thanks for a great rpy pac

Re: [Rpy] Another Mac install question

2008-05-12 Thread Gregory Warnes
The standard Mac version of R includes the necessary shared library, hence it is not necesary to do this. You should be able to simply run cd /path/to/rpy/source/code/ python setup.py build sudo python setup.py install and everything should install properly, at lea

Re: [Rpy] again installation on Mac OS X

2008-05-14 Thread Gregory Warnes
Hi Ernesto, These warning messages are normal, albeit annoying.I've just made commited changes to the the SVN repository to avoid the ones from rpymodule.c and io.c, so this should be less of a problem in the future. -Greg On May 14, 2008, at 3:34AM , Ernesto wrote: Dear all, I'm

Re: [Rpy] Version 1.0.3 now available

2008-05-14 Thread Gregory Warnes
Too bad. I guess I'll have to either add code to look for libRlapack.so in the appropriate directory. Know of any simple way to do this? -G On May 14, 2008, at 10:16AM , Dirk Eddelbuettel wrote: Hi Greg, On Wed, May 14, 2008 at 10:08:29AM -0400, Gregory. R. Warnes wrote: > > Hi

Re: [Rpy] Version 1.0.3 now available

2008-05-14 Thread Gregory Warnes
I just committed a change to use R CMD config LAPACK_LIBS. Can you check if it behaves properly? -G On May 14, 2008, at 1:14PM , Dirk Eddelbuettel wrote: On Wed, May 14, 2008 at 01:06:38PM -0400, Gregory Warnes wrote: > Too bad. > > I guess I'll have to either add co

Re: [Rpy] Version 1.0.3 now available

2008-05-14 Thread Gregory Warnes
Yea! On May 14, 2008, at 3:08PM , Dirk Eddelbuettel wrote: On Wed, May 14, 2008 at 02:36:27PM -0400, Gregory Warnes wrote: > I just committed a change to use R CMD config LAPACK_LIBS. Can you > check if it behaves properly? I get the commit emails, so I just hand-applied the changes

Re: [Rpy] Install successfully once, but fail afterward

2008-05-14 Thread Gregory Warnes
Hmm. Does rerunning the install make a difference? -G On May 14, 2008, at 4:44PM , Manu Hack wrote: Hi, I just installed R and rpy on Opensuse 10.3. I managed to get it work once. But then all of a sudden it won't work again. Here is the info. I compiled R-2.7.0 with configure --en

Re: [Rpy] Install successfully once, but fail afterward

2008-05-14 Thread Gregory Warnes
Is there a difference in the environment variables, particularly the value of RHOME? -G On May 14, 2008, at 5:39PM , Manu Hack wrote: On Wed, May 14, 2008 at 4:49 PM, Gregory Warnes <[EMAIL PROTECTED]> wrote: Hmm. Does rerunning the install make a difference? -G No, on

Re: [Rpy] filled.contour

2008-05-15 Thread Gregory Warnes
Hello Lars, You will need to create an R function to accomplish the needed task. One way is to put everything into one bug R function: from rpy import r r.pdf(filename,onefile=r.TRUE, width = 7.8, height = 7,) my_contour = r(""" function(x, y, z, n=20) { Lab.palette <- colorR

Re: [Rpy] Install successfully once, but fail afterward

2008-05-19 Thread Gregory Warnes
. -G On May 14, 2008, at 6:08PM , Manu Hack wrote: On Wed, May 14, 2008 at 5:50 PM, Gregory Warnes <[EMAIL PROTECTED]> wrote: Is there a difference in the environment variables, particularly the value of RHOME? -G No, RHOME are the same. On May 14, 2008, at 5:39PM , Manu H

Re: [Rpy] Pickling support

2008-05-19 Thread Gregory Warnes
The best way to store R objects is to use R's own 'save()' and 'load ()' functions. In order to use these, it is necessary for the objects to be assigned to R names, so you would have something like... from rpy import r # code here to create objects 'a' and 'b' r.as

Re: [Rpy] Windows Install Issue

2008-05-22 Thread Gregory Warnes
I think this is probably a Numpy installation issue. What happens if you issue the command import numpy ?? -Greg On May 22, 2008, at 1:40PM , James D Dickinson wrote: Hi - I'm fairly new to Python and I'm having a heck of a a getting the install of 'rPy' to go. I downloaded th

Re: [Rpy] Windows Install Issue

2008-05-22 Thread Gregory Warnes
Hmm. How about the more adventuresome import numpy.core.multiarray ? -Greg On May 22, 2008, at 3:59PM , James D Dickinson wrote: >>> import numpy works just fine no messages or errors - trying to import rpy results in same messages below -James >I think this is prob

Re: [Rpy] Windows Install Issue

2008-05-22 Thread Gregory Warnes
OK, this is quite odd. Two more things to try. First, try adding the directory containing multiarray.DLL to the PATH before running python. Second, if this doesn't work, try running python with the -v option and redirecting the output to a file.. -G On May 22, 2008, at 4:21PM , James

Re: [Rpy] SF.net SVN: rpy: [540] branches/rpy_nextgen/rpy/rinterface

2008-06-02 Thread Gregory Warnes
Hi Laurent, Why not use the get_R_HOME() function in rpy_tools.py, which already handles this for Unix and Win32. (On Win32 it checks for the proper R registry entry for this information, then falls back to other methods if this is not available.) -G On Jun 1, 2008, at 6:54AM , <[EMAI

Re: [Rpy] SF.net SVN: rpy: [541] branches/rpy_nextgen/rpy/rinterface/tests/ test_SexpVectorNumeric.py

2008-06-02 Thread Gregory Warnes
Makes good sense. -G On Jun 1, 2008, at 7:40AM , <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: Revision: 541 http://rpy.svn.sourceforge.net/rpy/?rev=541&view=rev Author: lgautier Date: 2008-06-01 04:40:33 -0700 (Sun, 01 Jun 2008) Log Message: --- - only keep suppo

Re: [Rpy] Hardy Heron apt package

2008-06-09 Thread Gregory Warnes
Aside, since rpy _does_ check for specific R versions, would it not be advisable for the .deb dependencies to reflect this appropriately? -G On Jun 8, 2008, at 1:13PM , Dirk Eddelbuettel wrote: On 8 June 2008 at 11:15, Lars Tangvald wrote: | Laurent Gautier skrev: | > 2008/6/7 Dirk Edde

Re: [Rpy] Arghh!!! RPY trials continue...Column naming fun.

2008-06-09 Thread Gregory Warnes
You may find the forumula syntax y ~ . helpful. If data= is supplied to the modeling command, the single period means 'all variables in the data frame that are not otherwised mentioned. As for changing he names on an existing object, you can't use the rownames(x) <- foo syntax

Re: [Rpy] RPy news pages

2008-06-09 Thread Gregory Warnes
Thanks Peter, the sf.net news page has been disabled. On Jun 9, 2008, at 10:05AM , Peter wrote: I'm confused about why there are two different news pages: http://rpy.sourceforge.net/news.html This includes the new wiki announcement and the 1.0.2 release and a lot of historical entries. Thi

Re: [Rpy] Hardy Heron apt package

2008-06-09 Thread Gregory Warnes
versions. -G On Jun 9, 2008, at 1:12PM , Dirk Eddelbuettel wrote: On Mon, Jun 09, 2008 at 12:36:19PM -0400, Gregory Warnes wrote: > Aside, since rpy _does_ check for specific R versions, would it not be > advisable for the .deb dependencies to reflect this appropriately? I tried that

Re: [Rpy] Arghh!!! RPY trials continue...Column naming fun.

2008-06-10 Thread Gregory Warnes
On Jun 10, 2008, at 9:20AM , Chris Arthur wrote: Thanks Gregory, that "y ~ ." syntax solves my problems. and allows my to pull out the PLSR data I wanted, but leads me to my next problem. Glad to help. I then try to use my model to predict the value of the matrix accFAS predicted=r.pr

Re: [Rpy] zero byte images

2008-06-19 Thread Gregory Warnes
The Cairo package is an optional library. You should be able to install it using: > install.packages(Cairo) And then get information on using it via: > library(Cairo) > ? Cairo -Greg On 6/16/08 4:13PM , "Patrick Jackson" <[EMAIL PROTECTED]> wrote: > I believe we are finally getting somewher

Re: [Rpy] rpy memory issues?

2008-06-24 Thread Gregory Warnes
Hi Paul, We could be of more assistance if you included some source code... Are you doing the looping in R or in python? -Greg On 6/23/08 10:32AM , "Jung, Paul" <[EMAIL PROTECTED]> wrote: > I'm having the following issue with rpy. I'm calling r.lm to do a bunch > of regressions (several hun

Re: [Rpy] Rpy on Mac

2008-06-24 Thread Gregory Warnes
On 6/24/08 10:52PM , "Nishant Joshi" <[EMAIL PROTECTED]> wrote: > Referenced from: /Library/Python/2.5/site-packages/libR.dylib Where exactly are your libR.dylib, libRblas.dylib, and libRlapack.dylib files? This doesn¹t look like the standard location... The standard locations on the mac is:

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Gregory Warnes
Hello Laurent, The R system itself is not thread safe, and has quite a bit of persistent state. Therefore if you want to use R from multiple threads, you will need to arrange to have a single thread interact with R at a time via appropriate locking or delegation. -G On 6/26/08 11:17AM , "lau

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Gregory Warnes
Side note: I developed the RSOAP package to allow a single multi-threaded python application to interact with multiple independent R processes cleanly. Take a look at http://rsoap.sourceforge.net or http://sourceforge.net/projects/rsoap/ -Greg On 6/26/08 11:17AM , "laurent oget" <[EMAIL PROTE

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Gregory Warnes
gt; >> 2008/6/26 laurent oget <[EMAIL PROTECTED]>: >>>> >>> So if I want to take advantage of my two cores, i need two processes, >>>> right? >>>> >>> >>>> >>> 2008/6/26 Gregory Warnes <[EMAIL PROTECTED]>: &

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Gregory Warnes
uments) > complicated (if possible). > > Ideas, or help, on the matter are welcome. > > > L. > > > > > 2008/6/26 Gregory Warnes <[EMAIL PROTECTED]>: >> > >> > Hello Laurent, >> > >> > The R system itself is not thr

Re: [Rpy] rpy in 2 threads

2008-06-27 Thread Gregory Warnes
of rpy > (may be a class extending Python's "threading.Thread" ?) > This makes good sense. -G > > L. > > > > > 2008/6/26 Gregory Warnes <[EMAIL PROTECTED]>: >> > Hi Laurent, >> > >> > It does seem desirable to inc

Re: [Rpy] R segfault on ctrl-c

2007-03-26 Thread Gregory Warnes
Hi Jacob, It looks like the event handler code isn't properly setting or resetting the control-c handler. Can you try seeing whether Control C is handled correctly while R itself is processing. IE, exectute: from rpy import r r("for(i in 1:1e6) 1+1") then press Control-C.

Re: [Rpy] R segfault on ctrl-c

2007-03-26 Thread Gregory Warnes
s with my small samples to produce the > issue more frequently. > > I realize this doesn't resolve your question with more than a > "sometimes". Is there a case that might test this more definitively? > > -Jacob > > On 03/26/2007 03:21 PM, Gregory Warnes wrote: >>

Re: [Rpy] R segfault on ctrl-c

2007-03-26 Thread Gregory Warnes
doesn't resolve your question with more than a > "sometimes". Is there a case that might test this more definitively? > > -Jacob > > On 03/26/2007 03:21 PM, Gregory Warnes wrote: >> Hi Jacob, >> >> It looks like the event handler code isn't

Re: [Rpy] R segfault on ctrl-c

2007-03-27 Thread Gregory Warnes
ible actions", keyboard input > goes > to python or nowhere, but never the menu itself. > > Thanks again. > -Jacob > > On 03/26/2007 04:14 PM, Gregory Warnes wrote: >> Hmm. Try this code instead, maybe it'll be slow enough to ensure you >> ca

Re: [Rpy] Subscription

2007-04-03 Thread Gregory Warnes
Thanks for letting me know about the broken links, I'll see about getting them fixed. -G On Apr 3, 2007, at 4:08AM , Dumoulin Nicolas wrote: > Hi there, > > I've just discover the rpy project, it looks great ! > > Before to ask technical questions (With a so beautiful manual, > maybe I will

Re: [Rpy] Subscription

2007-04-06 Thread Gregory Warnes
Done. The mailing list archive and Tim Church's demo are now accessible again. -G On Apr 3, 2007, at 10:07AM , Gregory Warnes wrote: > Thanks for letting me know about the broken links, I'll see about > getting them fixed. > > -G > > On Apr 3, 2007, at 4:0

Re: [Rpy] faithful.dat and faithful.py broken links

2007-04-16 Thread Gregory Warnes
Hi All, The missing files have been added to the site. -G On Apr 16, 2007, at 11:58AM , Alexander Belopolsky wrote: > On 4/16/07, Fabrice Tiercelin <[EMAIL PROTECTED]> wrote: > >> faithful.dat - the link is broken > > I guess Gregory will have to fix the links. Meanwhile you can get the > files

Re: [Rpy] os.system() fails after importing rpy

2007-04-17 Thread Gregory Warnes
Hello Erez, On Apr 17, 2007, at 3:56PM , Erez Lieberman wrote: > Hey All - > > I'd really love to get some insight into this, I'm just totally > puzzled! > > I'm trying to make system calls to clustalw, a sequence aligner > which takes arguments like filenames. The main point is just that I

Re: [Rpy] RPy and S4 classes

2007-04-23 Thread Gregory Warnes
Hi Sean, RPy should be perfectly happy with S4 classes, so you should be able to do what you want. -G On Apr 21, 2007, at 7:20PM , Sean Davis wrote: > I haven't started playing much with S4 classes from RPy. I have > used S4 classes a good bit in R, but wondered if anyone had some > poi

Re: [Rpy] build problems (OS X, MacPorts version of R)

2007-05-05 Thread Gregory Warnes
Hi John, If the gcc's are incompatible, then you may have yet another problem: python itself will have been built with one, and R the other. Before trying to modify the default compiler options, try running the compler commands that setup.py displays as it tries to work. It should pick up

Re: [Rpy] How to use libraries in rpy?

2007-05-13 Thread Gregory Warnes
Sorry, there was a typo in my message: On May 13, 2007, at 10:05PM , Gregory R. Warnes wrote: > > The problem is that in **R** '.' (period) is a valid character in a > variable/function *name*, while it is not valid in python. To > overcome this problem, use '_' (underscore), which RPy will tran

Re: [Rpy] example of "expression"?

2007-05-16 Thread Gregory Warnes
Hello John, The correct syntax for this in R is: axis(1, at=1:5, labels=expression(1^10, 2^10, 3^10, 4^10, 5^10)) Note that expression() expects actual R syntax and not strings. To handle strings you would need to do axis(1, at=1:5, labels=parse(text=c("1^10", "2^10", "3^1

Re: [Rpy] keep a rgl window open and active

2007-06-07 Thread Gregory Warnes
Hi Pierre, The easiest way to keep the window open is to prevent the script from exiting until you are done with the display. This can be accomplished by something like: r.readline("Press to exit: ") -Greg On Jun 7, 2007, at 10:24AM , pierre ratinaud wrote: > I all, > sorry if this is

Re: [Rpy] keep a rgl window open and active

2007-06-08 Thread Gregory Warnes
Hi Pierre, I'm sorry to hear that readlines() doesn't work properly under wxPython. It sounds like I need to take a look at it. In any case, The important concept is to prevent the script from exiting until you are done with the graph. There are many ways to accomplish this. -G On Jun

Re: [Rpy] Why RPy fails to load 'kernlab'?

2007-06-13 Thread Gregory Warnes
Have you verified that this package will load correctly directly in R? -G On Jun 13, 2007, at 12:05AM , Антонец Денис wrote: > Do you know the reason why RPy failed to load "kernlab" package? > Other packages were loaded correctly... Could this be explained by the > fact that "kernlab" uses S

Re: [Rpy] Why RPy fails to load 'kernlab'?

2007-06-14 Thread Gregory Warnes
Hello, I've loaded and run both e1071 and kernlab on my system (Mac OSX) using rpy. Please provide some information about your system so we can figure out what the problem is. Operating System Python Version R Version RPy Version Output of a complete session: from rpy import r

Re: [Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-17 Thread Gregory Warnes
The normal way to make the call to an r function using rpy is to call it like so: import rpy rpy.r.function_name(a=1, b=2, c=4) note that in R, the period character '.' is a valid part of names, while in python it is not. To overcome this problem, rpy translates the under

Re: [Rpy] Newbie Question on Passing Parameters from RPy to R

2007-06-19 Thread Gregory Warnes
Hi Michael, The trick here is that r['...'] expects the ... to be an object name, rather than a statement to be executed. The brackets following the name 'r' is shorthand for 'obtain the object named ... from r', which can also be expressed as, r.get('...') RPy provides a similar s

Re: [Rpy] error in building rpy in linux power-pc[sec=unclassified]

2007-06-23 Thread Gregory Warnes
Hello Mohar, This question is outside of the RPy scope. It looks like the type of question that should be posed to the R-devel mailing list: [EMAIL PROTECTED] -Greg On Jun 20, 2007, at 8:25PM , Mohar Chattopadhyay wrote: Dear all, I have encountered errors in compiling R-2.5.0

Re: [Rpy] Using Rpy with MPI

2007-06-25 Thread Gregory Warnes
Hi Tomi, I know it has been a while, did you get the help you needed? -Greg On May 4, 2007, at 12:22PM , Tomi Korhonen wrote: > Hello, > > I'm trying to use Rpy in a MPI-environment ( pypar ) where I > distribute my > processing to multiple CPU's. I'd like to be able to plot out the > resu

Re: [Rpy] rpy fails to load on Win32 (XP)

2007-06-25 Thread Gregory Warnes
Hello Gordan, Did you find a solution to your problem? -G On May 25, 2007, at 8:06AM , Gordon Bergling wrote: > Hi folks, > > I am currently trying to create a port of an linux application thats > uses python/pygtk/rpy. On my WinXP installation I have installed > R-2.5.0, python-2.5 and the ne

[Rpy] AD: Announcing commercial packaging and support for RPy

2007-06-28 Thread Gregory Warnes
Hi All, I've recently launched a software company, Random Technologies LLC that provides commercial packaging, support, services and validation materials for R, RPy, and RSOAP. For more information, please visit our web site: http://www.random-technologies-llc.com review our flyers

Re: [Rpy] --enable-R-shlib fails - do I *really* need it?

2007-07-02 Thread Gregory Warnes
Hi Skip, Yes, it is necessary to build R as a shared library in order for RPy to function. Have you checked for information / asked for assistance on the R-help list for this problem? BTW, what platform are you trying to build on? -Greg On Jul 2, 2007, at 4:53PM , Skip Montanaro wrote: >

Re: [Rpy] Installing rpy on Mac os x10.4.10

2007-08-01 Thread Gregory Warnes
Hi Mark, I regularly use rpy on my MacBookPro. What compiler's are you using? (Ie gcc -v ) -G On Jul 31, 2007, at 3:34PM , Mark Thomas wrote: > Hi > > I have spent most of today trying to install rpy on my Mac > (osx10.4.10). I > have python 2.5.1 and R version 2.5.0 (2007-04-23)

Re: [Rpy] Trivial patch to prevent exception

2007-09-05 Thread Gregory Warnes
Hello Manuzhai (and RPy'ers) I try to be pretty responsive, but have been really busy the last month or so setting up a new company to provide commercial packaging, support and services for R and RPy. Check us out at http://random- technologies-llc.com. I'll take a look at your patches, an

Re: [Rpy] Printing in R format

2007-09-07 Thread Gregory Warnes
Hi David, You need to use R's print function, rather than python's: from rpy import * data = { "y":[1,2,3,4], "x":[1,1,2,2] } set_default_mode(NO_CONVERSION) lm = r.lm(r("y~x"),data) summary_lm = r.summary(lm) tmp = r.print_ (summary_lm) Note the u

Re: [Rpy] question

2007-10-08 Thread Gregory Warnes
To use Rpy to compute the standard deviation to something like: >>> import rpy RHOME= /Library/Frameworks/R.framework/Resources RVERSION= 2.5.1 RVER= 2051 RUSER= /Users/warnes Loading Rpy version 2051 .. Done. Creating the R object 'r' .. Done >>> x = [1,2,3,4,5] >>> rpy.r.sd(x) 1.58113883008

Re: [Rpy] Python to R: Conversion puzzle...

2007-10-08 Thread Gregory Warnes
Something seems to be awry with Python 2.5. Can you check Python 2.4? -G On Oct 8, 2007, at 5:18PM , Vince Fulco wrote: > A review of the docs indicates that conversion s/b automatic. I am > trying to do some elementary calculations on a numpy array and am > getting the following error. > >

Re: [Rpy] Python to R: Conversion puzzle...

2007-10-09 Thread Gregory Warnes
It sounds like your version of RPy may have been compiled without NumPy support. Did you compile it yourself, or are you using a pre- build version. -G On Oct 8, 2007, at 5:18PM , Vince Fulco wrote: > A review of the docs indicates that conversion s/b automatic. I am > trying to do some e

Re: [Rpy] ZOPE and rpy

2007-10-12 Thread Gregory Warnes
Check out http://research.warnes.net/projects/RStatServer for a complete Zope+Rpy+R solution. -G On Aug 28, 2007, at 8:13AM , Rémi Flicoteaux wrote: > Hello, > > I trying to use R from zope / plone server using rpy interface with > python script on the zope server. > > Some errors occurred: w

Re: [Rpy] segfault on unicode string conversion

2007-10-16 Thread Gregory Warnes
I've been trying to make time to work on fixing all of the outstanding bugs. Other duties keep pulling me away. This should be a simple fix... On Oct 16, 2007, at 7:56PM , Toby Dylan Hocking wrote: > Hi all, > > I really need RPy to resolve this issue: > http://sourceforge.net/tracker/index

Re: [Rpy] segfault on unicode string conversion

2007-10-17 Thread Gregory Warnes
to use that. > > I'm going to take a short break from this for a bit, but please > email me any suggestions/ideas and what to do next. > > Toby Dylan Hocking > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Gregory > War

Re: [Rpy] RC3 fix for Python 2.4?

2007-10-17 Thread Gregory Warnes
I'm in the process of bug-fixing and patching. I expect to post a new source code release early next week, and will try to follow up with a windows build soon after. -G On Oct 17, 2007, at 6:58PM , Mario Beauchamp wrote: > Hi all, > > I am having the same probs mentioned previously import

Re: [Rpy] Dependencies and Win XP Error

2007-10-18 Thread Gregory Warnes
Hi Alex, I fixed a couple of Windows startup bugs and made the commit yesterday evening. So please try using the latest SVN source. -G On Oct 18, 2007, at 11:31AM , Alex Mandel wrote: > Peter wrote: >> Alex Mandel wrote: >>> A quick questions on getting started with Rpy: >>> >>> 1. Does t

Re: [Rpy] rpy and numpy arrays

2007-10-24 Thread Gregory Warnes
Hi All, I've made a bunch of changes in the SVN source code repository, some of which are specifically related to Numeric/NumPy conversion. Can y'all give the new code a try to see if it helps? -G On Oct 24, 2007, at 6:04PM , Matthew Brett wrote: >> I can reproduce the problem, yes. >> >>

Re: [Rpy] rpy and numpy arrays

2007-10-25 Thread Gregory Warnes
Thanks, I'll take a look when I'm off the clock! -G On Oct 25, 2007, at 9:17AM , Matthew Brett wrote: > Hi Gregg, > >> I've made a bunch of changes in the SVN source code repository, some >> of which are specifically related to Numeric/NumPy conversion. Can >> y'all give the new code a try to

Re: [Rpy] RPy and R 2.5.1? 1.0final?

2007-10-25 Thread Gregory Warnes
I'm off on a consulting project this week, but will be testing out the latest patch and (hopefully) posting a new release (which will be labeled 1.0.0) this evening, all going well. -G On Oct 25, 2007, at 12:18PM , Alex Mandel wrote: > Skip Montanaro wrote: >> Does Rpy work with R 2.5.1

Re: [Rpy] RPy and R 2.5.1? 1.0final?

2007-10-25 Thread Gregory Warnes
On Oct 25, 2007, at 12:50PM , Skip Montanaro wrote: > Alex & G(reg(ory)?)?, LOL! I use Gregory for formal stuff, Greg for my friends, and sign email with -G. ;-D -G - This SF.net email is sponsored by: Splunk Inc. Stil

Re: [Rpy] problem importing rpy

2007-11-05 Thread Gregory Warnes
These messages are generated by the R shared library as it attempts to load the fundimental R packages it needs. This usually means that your installation of R is lacking properly installed versions of these packages. Does R start up and run properly when run directly? -G On Nov 2, 200

Re: [Rpy] problem importing rpy

2007-11-05 Thread Gregory Warnes
ally use R independently of rpy, so I'm not sure of how to test that they are working correctly other than that. Is there something I can run to test it? On 11/5/07, Gregory Warnes <[EMAIL PROTECTED]> wrote: These messages are generated by the R shared library as it attempts to load the f

Re: [Rpy] Rpy installation problem with R2.5.0, python 2.5.1, Win XP

2007-11-07 Thread Gregory Warnes
Hi JL, I'm in the proccess of fixing a number of bugs with RPy, and will be releasing a new version shortly that resolves this issue. If you are impatient, you can get the current version from the subversion repository, where the fix for this issue has already been committed. -G Nov 7,

Re: [Rpy] RPy & Windows install and import problems

2007-11-29 Thread Gregory Warnes
Hi Bo, As soon as I confirm that all the tests run properly, I'll post the source package for 1.0.1. I'll be glad to let you build and upload the windows binary version... -G On Nov 29, 2007, at 11:48AM , Bo Peng wrote: >> Somehow I missed the removal of the 'xstr(...)' when I generated

[Rpy] Lapack DLL load problem

2007-11-29 Thread Gregory Warnes
Ok, first, on windows, rpy attempts to add the necessary locations to the PATH environment variable so that DLLs are properly found. If the new version doesn't solve the problem, a work-around is to manually set up the path before starting python (or from within python) so that the direc

Re: [Rpy] RPy & Windows install and import problems

2007-11-29 Thread Gregory Warnes
OK, RPy 1.0.1 with the windows fix is up, including binaries. Please take them for a spin and let me know if there are any problems. -G On Nov 29, 2007, at 1:33PM , Gregory Warnes wrote: > Hi Bo, > > As soon as I confirm that all the tests run properly, I'll post the > s

Re: [Rpy] Repeated measure ANOVA : formula and summary problem

2007-12-18 Thread Gregory Warnes
Hi Etienne, The basic problem is that under the default conversion mode (BASIC_CONVERSION) all R objects are converted to roughly-equivalent python structures. As a consequence, the object 'av' isn't actually an R object, so r.summary(av) won't treat it as such. The simplest solution i

Re: [Rpy] Repeated measure ANOVA : formula and summary problem

2007-12-18 Thread Gregory Warnes
n R-->Python happens, some information is lost, so the av object itself isn't a valid aov R object when Python--R conversion happens. -G > However, I tried to call explicitly summary_aov() with no success. > But I have to test it before to go further. > Thanks again !! > -Etie

Re: [Rpy] a question about SCALE function.

2007-12-19 Thread Gregory Warnes
When asking a question of this sort, it is usually helpful to provide an example of the code you were attempting to run. For what its worth, the scale function works properly for me: >>> from rpy import * >>> r.scale( range(10) ) array([[-1.48630108], [-1.15601195], [-0.82572

Re: [Rpy] still cannot import rpy on XP

2007-12-20 Thread Gregory Warnes
Hi Mario, Can you check the python local packages directory to check the version of rpy that is actually getting installed. I did have a small problem in the first version of the file I uploaded, but I thought that I had fixed it -G On Dec 19, 2007, at 10:04PM , Mario Beauchamp wrote

Re: [Rpy] error reading Rconsole

2008-01-02 Thread Gregory Warnes
Hi Barry, I suspect the problem is that QGIS has set up python's console input differently than rpy expects. At the moment, there is no way to tell RPy to do something different with i/o during startup. (After startup you can call set_rpy_output() and set_rpy_input() to provide new i/o

Re: [Rpy] back-compatibility for python

2008-01-03 Thread Gregory Warnes
Hi Laurent, I'm glad to see your contributions. Robj, in particular, has needed to be expanded to support all of the (appropriate) python operations for some time. Make sure and look at the stuff in /sandbox ... Since 2.2 was released Dec 2001, I expect that we can now drop support for p

Re: [Rpy] error reading Rconsole

2008-01-03 Thread Gregory Warnes
Hi Barry, Grab the latest SVN version of rpy. I've added the ability to avoid setting up reading and writing the console via rpy_options: import rpy_options rpy_options.set_options(SETUP_READ_CONSOLE=False, SETUP_WRITE_CONSOLE=False, SETUP_SHOWFILES=False) from rpy im

Re: [Rpy] still cannot import rpy on XP

2008-01-03 Thread Gregory Warnes
> On Dec 20, 2007 5:20 PM, Gregory Warnes <[EMAIL PROTECTED]> > wrote: >> Hi Mario, >> >> Can you check the python local packages directory to check the >> version of rpy that is actually getting installed. I did have a >> small problem in the first versio

Re: [Rpy] back-compatibility for python

2008-01-04 Thread Gregory Warnes
> in touch with him to know what is in there ? > > Laurent > > > 2008/1/3, Gregory Warnes <[EMAIL PROTECTED]>: >> >> Hi Laurent, >> >> I'm glad to see your contributions. Robj, in particular, has needed >> to be expanded to support all of th

Re: [Rpy] still cannot import rpy on XP

2008-01-07 Thread Gregory Warnes
Hi Mario, > I had stepped through rpy.py in pythonwin and everything was normal. > It crashes pythonwin in the exec("import _rpy%s as _rpy" % RVER) > statement, and RVER > is the right one. > Oh dear. > I will investigate further tomorrow, when I'm on my XP box. > Ok, thanks. -G > cheers >

Re: [Rpy] error reading Rconsole

2008-01-07 Thread Gregory Warnes
On Jan 7, 2008, at 11:32AM , Barry Rowlingson wrote: > Gregory Warnes wrote: >>> Thanks for the help, not sure where to go now except maybe if >>> rpy had an option to pass --no-Rconsole to R on startup... >> Rpy can pass anything we want to R, but as far as I can

Re: [Rpy] still cannot import rpy on XP

2008-01-07 Thread Gregory Warnes
Oh, thank goodness. I'm glad it was an easy fix. :-D -G On Jan 7, 2008, at 3:01PM , Mario Beauchamp wrote: > Hi Gregory, > > On Jan 7, 2008 10:16 AM, Gregory Warnes <[EMAIL PROTECTED]> > wrote: >> >> Hi Mario, >> >>> I had stepped through rpy

Re: [Rpy] unicode woes, or joys...

2008-01-08 Thread Gregory Warnes
There was also a bug in RPy's handling of unicode strings until 1.0, so make sure you have a recent version of RPy as well. -G On Jan 8, 2008, at 2:47AM , Laurent Gautier wrote: > Crashes with unicode labels in plots was reported as a problem > with R-2.3 to R-2.5. > It appears fixed with th

Re: [Rpy] R/Rpy/Qgis RConsole problem

2008-01-08 Thread Gregory Warnes
Thats odd. If you've got the setup to compile RPy, you might try adding an explicit "--no-Rconsole" argument to the variable "defaultargv" at the top of src/rpymodule.c and see if that makes a difference for the 'out of the box' R. -G On Jan 8, 2008, at 12:11PM , Barry Rowlingson wrote:

Re: [Rpy] multithreading with rpy

2008-01-18 Thread Gregory Warnes
R itself is neither multithreaded, nor thread safe. If you want to interact with more than one R session, you'll have to have a separate process for each R session. I built the RSOAP tool, which includes wrapper (called something like) LocalRSOAPConnection that wraps the separate session

  1   2   >