Re: [Rpy] help with the package survival

2008-02-21 Thread Laurent Gautier
2008/2/21, Lore Merdrignac <[EMAIL PROTECTED]>: > > > Date: Thu, 21 Feb 2008 08:16:10 -0500 > > From: [EMAIL PROTECTED] > > To: rpy-list@lists.sourceforge.net > > Subject: Re: [Rpy] help with the package survival > > > > > On Thu, Feb 21, 2008 at 8:08 AM, Lore Merdrignac <[EMAIL PROTECTED]> > wrote

Re: [Rpy] help with the package survival

2008-02-21 Thread Laurent Gautier
May be importing rpy with import rpy does help ? 2008/2/21, Lore Merdrignac <[EMAIL PROTECTED]>: > > > Date: Thu, 21 Feb 2008 14:48:10 +0100 > > From: [EMAIL PROTECTED] > > > To: rpy-list@lists.sourceforge.net > > Subject: Re: [Rpy] help with the package survival > > > > 2008/2/21, Lore Merd

Re: [Rpy] package : survival

2008-02-27 Thread Laurent Gautier
2008/2/27, Lore Merdrignac <[EMAIL PROTECTED]>: > > Hi, > I have already posted a first problem of "NO_CONVERSION" with the package > SURVIVAL. But I still have a problem by using the function survfit() of the > package. > Here is the code : > > >>> from rpy import * > >>> r.library("survival")

Re: [Rpy] package : survival

2008-02-27 Thread Laurent Gautier
2008/2/27, Lore Merdrignac <[EMAIL PROTECTED]>: > > Thanks for answering. > I had already tested to split the expression but there is still a problem > with the function survfit(). Nevertheless this expression works with R, but > I have to implement it with python. Indeed, I am trying to create a

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

2008-03-03 Thread Laurent Gautier
2008/3/4, Gregory Warnes <[EMAIL PROTECTED]>: > Wow, Laurent, you've been doing a lot of work! That's still a little rough and disorganised. It will get better. > On Mar 2, 2008, at 2:52PM , <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> wrote: > > (there is something odd going on, with variable na

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

2008-04-01 Thread Laurent Gautier
2008/4/1, Peter <[EMAIL PROTECTED]>: > Hi Lukasz, > > If your data has all the elements of the same type, then you could try > loading it into a NumPy matrix or array, and passing that to R. > > I personally would pass the filename to R, and use R's read.table() > command to load it in R. You

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

2008-04-09 Thread Laurent Gautier
Issues with the C stack are encountered now and then, and this might be a problem with R: http://tolstoy.newcastle.edu.au/R/e4/help/08/01/2069.html More generally, whenever the host application (here the Python process) is manipulating the stack (like when using threads I think) the problem might

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

2008-04-09 Thread Laurent Gautier
d the X display stays open and > zombie, but control is returned to python > > >>> rpy.r.plot([1,2,3],[4,5,6]) > > >>> Error during wrapup: C stack usage is too close to the limit > > *** caught segfault *** > > address 0x18, cause 'memory not mapped' > > > Possible acti

Re: [Rpy] Installing rpy on a 64 bit ubuntu server

2008-04-11 Thread Laurent Gautier
One line in the log tells: src/RPy.h:56:20: error: Python.h: No such file or directory wouldn't you have the development headers missing ? 2008/4/11, Paul Geeleher <[EMAIL PROTECTED]>: > Hi, I'm wondering if anyone has experience of installing rpy on 64 bit > ubuntu gutsty? > > I've built R v

[Rpy] Numpy and Numeric

2008-04-20 Thread Laurent Gautier
Can anyone confirm that RPy on Win32 will only run with the Numpy package, not with Numeric ? (recent bug report about the download page saying the opposite) Thanks, L. - This SF.net email is sponsored by the 2008 JavaOne(

Re: [Rpy] Updated homepage

2008-04-24 Thread Laurent Gautier
2008/4/24, Peter <[EMAIL PROTECTED]>: > I've just noticed the updated home page - it looks nice and clean, and > the updated logo seems to match nicely. Good job :) Thanks. I have revamped the web-page quickly to relax from working on Rpy v2.0 (I would have liked to spend more time on the page,

Re: [Rpy] Updated homepage

2008-04-24 Thread Laurent Gautier
2008/4/24, Peter <[EMAIL PROTECTED]>: > > > I've just noticed the updated home page - it looks nice and clean, and > > > the updated logo seems to match nicely. Good job :) > > > > Thanks. > > I have revamped the web-page quickly to relax from working on Rpy v2.0 > > (I would have liked to

Re: [Rpy] segfault and 'release unlocked lock'

2008-05-10 Thread Laurent Gautier
2008/5/10 Andrew Dalke <[EMAIL PROTECTED]>: > On May 7, 2008, at 1:02 AM, Andrew Dalke wrote: >> I've been having a lot of problems with intermittent crashes while >> using RPy under a rather old Python 2.4.2 install, with no Numeric >> support whatsoever. This is all under Linux. > > >> *** cau

Re: [Rpy] [ rpy-Support Requests-1576013 ] threading

2008-05-13 Thread Laurent Gautier
2008/5/13 SourceForge.net <[EMAIL PROTECTED]>: (...) > Is this because R itself isn't thread-safe? This is most likely the cause. Try spawing separate subprocesses instead. - This SF.net email is sponsored by: Microsoft Def

Re: [Rpy] again installation on Mac OS X

2008-05-14 Thread Laurent Gautier
By the way, the default compilation for python modules is with the flag -Wstrict-prototypes. It used to generate a number of warnings, and after I reported it on the r-devel list, it was solved (for R-2.7). (well mostly, there is a last warning: include/R_ext/Rdynload.h:26: warning: function declar

Re: [Rpy] Windows Install Issue

2008-05-22 Thread Laurent Gautier
2008/5/22 James D Dickinson <[EMAIL PROTECTED]>: > > Alright- > a) Strangely, I cannot locate a multiarray.DLL anywhere on my harddrive. > b) I hate to admit, but as a newbie to python - I can't figure out the -v > option. > and I know its an easy implementation - just not sure when to insert,

[Rpy] rpy-1.0.3 for Microsoft Windows

2008-05-23 Thread Laurent Gautier
Pre-compiled modules were just built and uploaded. Check the download page. L. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt

Re: [Rpy] Please help: invalid 'envir' argument

2008-06-01 Thread Laurent Gautier
2008/6/1 <[EMAIL PROTECTED]>: > Thanks for that Barry thats much clearer now, I had done print yarn, and > didn't understand why it had returned the string "yarn". Its all clear now > though. > > Making the change you suggest though moves me forward but then throws the > following error > "Traceba

Re: [Rpy] Hardy Heron apt package

2008-06-05 Thread Laurent Gautier
Without further details on the missing module error, it is not easy to help... could you share them ? Thanks, L. 2008/6/5 Lars Tangvald <[EMAIL PROTECTED]>: > Hi, > > I'm working on an open-source project for running various > chemometrics-related algorithms (www.scicraft.org). > The software

Re: [Rpy] Hardy Heron apt package

2008-06-05 Thread Laurent Gautier
; A quick work around, if you do the recompile use the checkinstall >> option. A side benefit will be a .deb file that you can give to other >> people with the same setup. It's not guaranteed to work on everyone >> else's machines with 8.04 but for the same pr

Re: [Rpy] segfault and 'release unlocked lock'

2008-06-06 Thread Laurent Gautier
2008/5/10 Laurent Gautier <[EMAIL PROTECTED]>: > 2008/5/10 Andrew Dalke <[EMAIL PROTECTED]>: >> On May 7, 2008, at 1:02 AM, Andrew Dalke wrote: (...) > >> What I would like to know is, is there a way to disable R's >> insistence on overriding the signa

Re: [Rpy] Hardy Heron apt package

2008-06-08 Thread Laurent Gautier
2008/6/7 Dirk Eddelbuettel <[EMAIL PROTECTED]>: > > On 5 June 2008 at 11:08, Laurent Gautier wrote: > | The "issue" is with the .deb packager. > | That means that R-2.6.2 was not around when the package was built (may > | be it was not released then). > > It&

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

2008-06-08 Thread Laurent Gautier
2008/6/7 <[EMAIL PROTECTED]>: > Hi Guys, sorry for the uninformative title. > > Basically If folk remember I am wanting to do some PLS regression on some > data. Folk on this list were kind enough to point me in the direction of > how to do this and I seem to have hit a really simple error which h

Re: [Rpy] SF.net SVN: rpy: [558] branches/rpy_nextgen/setup.py

2008-06-09 Thread Laurent Gautier
2008/6/9 Peter <[EMAIL PROTECTED]>: > On Sun, Jun 8, 2008 at 9:19 PM, <[EMAIL PROTECTED]> wrote: >> Revision: 558 >> http://rpy.svn.sourceforge.net/rpy/?rev=558&view=rev >> Author: lgautier >> Date: 2008-06-08 13:19:00 -0700 (Sun, 08 Jun 2008) >> >> Log Message: >> --- >> Ve

Re: [Rpy] Hardy Heron apt package

2008-06-09 Thread Laurent Gautier
2008/6/10 Gregory Warnes <[EMAIL PROTECTED]>: > > Well, unless/until we change the implementation, I think the rpy package > really must match the exact version*s* of R it was compiled againts. It does, but because I think this is enforced by name mangling of the C-written python module rpymodule*

[Rpy] rpy2-alpha0 released

2008-06-09 Thread Laurent Gautier
Hi, There an "early alpha" release for a new version of RPy available for download: http://sourceforge.net/project/showfiles.php?group_id=48422&package_id=277454 That version will not overwrite any currently installed RPy-1.x; trying it is presumably safe and certainly useful if problems, questio

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

2008-06-11 Thread Laurent Gautier
import rpy foo = rpy.r.list(a=1, b=2, c=3) rpy.r["names"](foo) tmp = rpy.r["names<-"](foo, ['d', 'e', 'f']) rpy.r.str(tmp) List of 3 $ d: int 1 $ e: int 3 $ f: int 2 2008/6/11 Renato Alves <[EMAIL PROTECTED]>: > Still can't get it to work... Am I missing something? > > b <- r("'rownames<-'"

Re: [Rpy] Build problem under linux-x86_64

2008-06-18 Thread Laurent Gautier
2008/6/18 Tim Axelrod <[EMAIL PROTECTED]>: > Hello, > > Just tried to install rpy for the first time, and ran into the following. > Any suggestions? Would it be working with a more recent version of R ? > Thanks, > Tim > - > [EMAIL PROTECTED] rpy-1.0.3]# python setup.py install > RHOMES=

Re: [Rpy] Build problem under linux-x86_64

2008-06-19 Thread Laurent Gautier
2008/6/19 Tim Axelrod <[EMAIL PROTECTED]>: > > > Laurent Gautier wrote: > >> 2008/6/18 Tim Axelrod <[EMAIL PROTECTED]>: >> >>> >>> Hello, >>> >>> Just tried to install rpy for the first time, and ran into the following. >&

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

2008-06-21 Thread Laurent Gautier
Chris, Giving an example that works (or does not work, actually) straight out of a copy/paste is making it easier for anyone willing to help. I had a quick try at getting one, but cannot run the example in the documentation for the function 'plsr'. import rpy rpy.r.library('pls') rpy.r.data('yar

Re: [Rpy] rpy memory issues?

2008-06-24 Thread Laurent Gautier
There are two-garbage collection systems at play in rpy (the one from Python and the one from R). It is possible that there is such a problem. Could you share a self-sufficient short piece of code (something that works straight out of a copy/paste and triggers the problem) ? Thanks, L. 2008

Re: [Rpy] Preventing R output to stdout

2008-06-24 Thread Laurent Gautier
You can use R's "sink()" It is used in rpy2 to map R's "print" to Python objects' "__str__()". Check lines 84 to 102 at: http://rpy.svn.sourceforge.net/viewvc/rpy/branches/rpy_nextgen/rpy/robjects/__init__.py?view=markup&pathrev=562 2008/6/24 Renato Alves <[EMAIL PROTECTED]>: > Hi, > > I'm runni

Re: [Rpy] rpy and mod_python problem

2008-06-25 Thread Laurent Gautier
Wild guess: this has something to do with the multiple interpreters http://www.modpython.org/live/current/doc-html/pyapi-interps.html (reading the doc Python's C-level "Py_NewInterpreter()" is hinting that this is likely the nature of the problem). For now, there is not much to do beside using py

Re: [Rpy] a few high-level questions about rpy2 and a question about matrix indexing

2008-06-25 Thread Laurent Gautier
2008/6/25 laurent oget <[EMAIL PROTECTED]>: > Wise Rpy fellows, > > I just came back to using R after a few years and am happy to see that the > RPy project is alive and well, and hope I will be able to provide some help > in the future. > > For now I have a few questions about rpy2: > -is there a

Re: [Rpy] rpy and mod_python problem

2008-06-25 Thread Laurent Gautier
would rpy2 w/ R-2.7 and Python 2.5 behave ? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Christof > Winter > Sent: Wednesday, June 25, 2008 7:54 AM > To: RPy help, support and design discussion list > Subject: Re: [Rpy] rpy and

Re: [Rpy] data.frames in rpy2

2008-06-25 Thread Laurent Gautier
2008/6/25 Sean Davis <[EMAIL PROTECTED]>: > First, Laurent, I am giving rpy2 a try and REALLY like what I see so > far. It is very much more intuitive, both from the point-of-view of > an R programmer as well as for python programmers. > > Data frames are very nice R data structures, so I would li

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Laurent Gautier
Speaking of which, it would be nice if rpy was shipped with a vanilla locking mechanism. R remaining probably thread-unsafe for the foreseeable future, I was thinking of having something like a two-locks mechanism that would lock R and release Python's GIL whenever an access to R is made. The exp

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Laurent Gautier
yes. 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]>: >> >> Hello Laurent, >> >> The R system itself is not thread safe, and has quite a bit of persistent >> state. Therefor

Re: [Rpy] rpy in 2 threads

2008-06-26 Thread Laurent Gautier
Davis <[EMAIL PROTECTED]>: > On Thu, Jun 26, 2008 at 12:05 PM, Laurent Gautier <[EMAIL PROTECTED]> wrote: >> yes. > > Unless you use a package like Rmpi. I have NO idea how that would > work with Rpy, but it is another possibility. Also, I think there has > bee

Re: [Rpy] rpy in 2 threads

2008-06-27 Thread Laurent Gautier
ead object" which has 'exclusive' > access to R. All of the "other" threads communicate with R through this > separate R thread object. > > .. > > -G > > > On 6/26/08 11:42AM , "Laurent Gautier" <[EMAIL PROTECTED]> wrote: > > S

Re: [Rpy] a few high-level questions about rpy2 and a question about matrix indexing

2008-06-30 Thread Laurent Gautier
I didn't. I like the idea. Thanks, L. 2008/7/1 Michael Sorich <[EMAIL PROTECTED]>: > With regard to R indexing on the objects have you thought about using > the __getitem__ method of an attribute. > > E.g. python indexing m[:,1], r indexing m.r[:,2] > > class RIndex(object): >def __init

[Rpy] rpy2 - 2.0.0alpha1

2008-07-06 Thread Laurent Gautier
Hi, The second alpha for rpy2 is available for download on sourceforge (source package and win32-python2.5 binary). A summary of what changed can be found in the documentation and the documentation is now available online at: http://rpy.sourceforge.net/rpy2/doc/html/ L. ---

Re: [Rpy] data.frames in rpy2

2008-07-07 Thread Laurent Gautier
s with the current R and Python): import rpy2.tests import unittest suite = rpy2.tests.suite() # increase the verbosity level if needed unittest.TextTestRunner(verbosity=0).run(suite) 2008/6/26 Sean Davis <[EMAIL PROTECTED]>: > On Wed, Jun 25, 2008 at 5:30 PM, Laurent Gautier <[EMAIL

Re: [Rpy] rpy and mod_python problem

2008-07-14 Thread Laurent Gautier
riginal Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Christof > Winter > Sent: Wednesday, June 25, 2008 7:54 AM > To: RPy help, support and design discussion list > Subject: Re: [Rpy] rpy and mod_python problem > > > Laurent Gautier wrote, On

Re: [Rpy] segmentation fault after long batch of LM

2008-07-14 Thread Laurent Gautier
Someone else reported on this list a similar sounding problem not so long ago. The problem might be caused by manipulating a stale pointer to an R object (that is an object that was discarded during R's garbage collection), and troubleshooting this will likely mean running things through a C debu

Re: [Rpy] segmentation fault after long batch of LM

2008-07-14 Thread Laurent Gautier
s pointed at from Python objects are protected from R's garbage collection)... and it seem that there is something going on with garbage collection (depending on how the python implementation, it either crashes after 10-50 iterations... or can go through 1000 iterations. > Thanks, >

Re: [Rpy] segmentation fault after long batch of LM

2008-07-16 Thread Laurent Gautier
; > test this hypothesis? >>> >>> gc() >>> #possibly gc(verbose = TRUE) >>> >>> >>> I have made a toy example to see if I could reproduce it here (with rpy2 >>> - >>> but there are similarities in the way R objects pointed at from

Re: [Rpy] segmentation fault after long batch of LM

2008-07-17 Thread Laurent Gautier
cause I have variables who are in > several dataframes with the same name. Do you think mangling the names of > the variables before passing them to R might help? Would it be an > interesting experiment? > > Laurent > > 2008/7/16 Laurent Gautier <[EMAIL PROTECTED]>: >> >&

Re: [Rpy] rpy and mod_python problem

2008-07-17 Thread Laurent Gautier
nk it is not 2.7-specific. The oldest version that worked without > messing with stack usage limits in the shell was R-2.2.1. > > -----Original Message- > From: Laurent Gautier [mailto:[EMAIL PROTECTED] > Sent: Monday, July 14, 2008 8:40 AM > To: Toby Hocking > Cc: RPy hel

Re: [Rpy] segmentation fault after long batch of LM

2008-07-17 Thread Laurent Gautier
2008/7/17 laurent oget <[EMAIL PROTECTED]>: > > > 2008/7/17 Laurent Gautier <[EMAIL PROTECTED]>: >> >> I am a bit confused. >> >> Do you have data frames created and bound to the same Python variable >> names ? >> >> Or do you have

Re: [Rpy] segmentation fault after long batch of LM

2008-07-18 Thread Laurent Gautier
2008/7/18 Laurent Gautier <[EMAIL PROTECTED]>: > 2008/7/17 laurent oget <[EMAIL PROTECTED]>: >> >> >> 2008/7/17 Laurent Gautier <[EMAIL PROTECTED]>: >>> > It might not really be a race condition, but more an overzealous > garbage collect

Re: [Rpy] segmentation fault after long batch of LM

2008-07-21 Thread Laurent Gautier
['y'] = y dataf = dataframe(**subvar) fit = lm('y ~ %s + %s' %(subvarnames[0], subvarnames[1]), data=dataf) sumfit = ro.r.summary(fit) rsq = sumfit.r['adj.r.squared'][0][0] res.append((v1_i, v2_i, rsq)) ## check R

Re: [Rpy] segmentation fault after long batch of LM

2008-07-22 Thread Laurent Gautier
think there is any hope i will be able to patch rpy1? I do not know much > about rpy yet, but if you think that is do-able this would give me a good > pretext to learn. > > Laurent > > 2008/7/21 Laurent Gautier <[EMAIL PROTECTED]>: >> >> I fixed a problem w

Re: [Rpy] Interfacing with Python from R?

2008-07-24 Thread Laurent Gautier
2008/7/24 Matias Piipari <[EMAIL PROTECTED]>: > That's a shame... I've unsuccessfully tried to run RSPython on my Macbook > for the last few days and got as far as changing the configure script enough > to make it compile (doesn't run yet though). It's probably not worth the > effort as it seems to

Re: [Rpy] Interfacing with Python from R?

2008-07-25 Thread Laurent Gautier
2008/7/25 Matias Piipari <[EMAIL PROTECTED]>: > > > On Fri, Jul 25, 2008 at 8:49 AM, Barry Rowlingson > <[EMAIL PROTECTED]> wrote: >> >> 2008/7/24 Laurent Gautier <[EMAIL PROTECTED]>: >> >> > Unless someone steps forward to help, design and

Re: [Rpy] problems importing rpy

2008-08-06 Thread Laurent Gautier
No real idea (I do not run in under winXP very often). Did you try the usual WinXP mantra "desinstall-reinstall-reboot" ? L. 2008/8/5 gfunch <[EMAIL PROTECTED]>: > Hi, > I am having problems importing rpy in Windows under Python 2.5.2 / R2.7: > import rpy > Error in function (x, pos = -

[Rpy] rpy2: alpha2 released

2008-08-06 Thread Laurent Gautier
Hi, Rpy2 version 2.0.0-alpha2 was released. The beta release, and then the release, should arrive soon now. It is easier to make changes now that later (so do not wait too long before giving feedback). Laurent - This SF.N

Re: [Rpy] rpy2: alpha2 released

2008-08-07 Thread Laurent Gautier
g_m.groups() 2008/8/7 Peter <[EMAIL PROTECTED]>: > On Wed, Aug 6, 2008 at 9:46 PM, Laurent Gautier <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Rpy2 version 2.0.0-alpha2 was released. >> >> The beta release, and then the release, should arrive soon now.

Re: [Rpy] rpy2: alpha2 released

2008-08-07 Thread Laurent Gautier
months? > > Laurent > > 2008/8/6 Laurent Gautier <[EMAIL PROTECTED]> >> >> Hi, >> >> Rpy2 version 2.0.0-alpha2 was released. >> >> The beta release, and then the release, should arrive soon now. >> >> It is easier to m

Re: [Rpy] rpy2: alpha2 released

2008-08-07 Thread Laurent Gautier
2008/8/7 Peter <[EMAIL PROTECTED]>: > On Thu, Aug 7, 2008 at 4:49 PM, Laurent Gautier <[EMAIL PROTECTED]> wrote: >> It is looking like the setup script is too picky. >> >> The following patch in setup.py should make

Re: [Rpy] rpy2: alpha2 released

2008-08-07 Thread Laurent Gautier
2008/8/7 Warnes, Gregory R. <[EMAIL PROTECTED]>: > I get a similar error on my Mac Leopard system: > > > [Crooked-2:~/src/rpy_nextgen] warnes% python setup.py build > running build > running build_py > creating build > creating build/lib.darwin-9.4.0-i386-2.4 > creating build/lib.darwin-9.4.0-i386-

Re: [Rpy] rpy2: alpha2 released

2008-08-07 Thread Laurent Gautier
2008/8/7 Laurent Gautier <[EMAIL PROTECTED]>: > 2008/8/7 Warnes, Gregory R. <[EMAIL PROTECTED]>: >> I get a similar error on my Mac Leopard system: >> >> >> [Crooked-2:~/src/rpy_nextgen] warnes% python setup.py build >> running build >> r

Re: [Rpy] rpy2: alpha2 released

2008-08-07 Thread Laurent Gautier
+1 (and I need to investigate that further). Thanks, Laurent 2008/8/7 Warnes, Gregory R. <[EMAIL PROTECTED]>: > Works fine for me after removing the old fink python 2.4 so that I'm > using 2.5.1 > > -G > > -Original Message- > From: Laurent Gautier

Re: [Rpy] Fwd: rpy2- error using hist example on WXP...

2008-08-17 Thread Laurent Gautier
2008/8/17 Vince Fulco <[EMAIL PROTECTED]>: > x = robjects.r.rnorm(100) > > robjects.r('hist(%s, xlab="x", main="hist(x)")' %repr(x)) > > Traceback (most recent call last): > File "", line 1, in > robjects.r('hist(%s, xlab="x", main="hist(x)")' %repr(x)) > File "C:\Python25\Lib\site-packages\rp

Re: [Rpy] Plotting in RPy v2.0.0.3a

2008-10-09 Thread Laurent Gautier
2008/10/9 Peter <[EMAIL PROTECTED]>: >>> r.dev.off() >>> ... >>> LookupError: 'dev' not found >> >> Python is not R. The dot ("."), like in a large number of other >> language, has a particular semantic meaning and therefore is >> not a valid character for variable names. >> >> r['dev.off']() is wh

Re: [Rpy] Plotting in RPy v2.0.0.3a

2008-10-09 Thread Laurent Gautier
g RPy 1.x because of my problems, but am going to re-install RPy 2.xx > and try the solution. > Thanks again for both the answer and for your work on RPy. I appreciate it > greatly. > Srikanth. > > On Thu, Oct 9, 2008 at 6:31 AM, Laurent Gautier <[EMAIL PROTECTED]> wr

Re: [Rpy] [PATCH] passing numpy arrays to rpy2 functions

2008-11-20 Thread Laurent Gautier
Peter wrote: > On Thu, Nov 20, 2008 at 12:02 AM, Nathaniel Smith <[EMAIL PROTECTED]> wrote: > >> In particular, looking at Rinternals.h, VECTOR_ELT etc. are defined in >> terms of calculating direct memory offsets from an SEXPREC. Not only >> are there no strides (necessary for column-major R t

Re: [Rpy] problem function call

2008-11-20 Thread Laurent Gautier
I does look like the python function garch given in the example is mixing up few things, and that var_r in by definition in that very function not a data.frame. L. PS: Isnt't "fGarch" for teaching computational finance ? laurent oget wrote: > I do not know garchfit, but it looks to me like i

Re: [Rpy] memory leak?

2008-11-21 Thread Laurent Gautier
laurent oget wrote: > is there something i can do to prevent the following script from leaking > memory? There seems to be something happening. (more below) > Laurent > > from rpy2.robjects import r,RVector,RDataFrame > from rpy2.rlike.container import TaggedList > from math import sin > impor

Re: [Rpy] memory leak?

2008-11-21 Thread Laurent Gautier
nstead of passing it as an argument > of lm every time. As an added benefit this reduces the number of copy, > which increases performance. It is still leaking, though.... > > Laurent > > 2008/11/21 Laurent Gautier <[EMAIL PROTECTED]>: >> laurent oget wrote: >>>

Re: [Rpy] memory leak?

2008-11-21 Thread Laurent Gautier
Laurent > > 2008/11/21 Laurent Gautier <[EMAIL PROTECTED]>: >> laurent oget wrote: >>> is there something i can do to prevent the following script from leaking >>> memory? >> >> There seems to be something happening. >> (more below) >&g

[Rpy] rpy2-2.0.0 released

2008-11-27 Thread Laurent Gautier
Hi, The first release for rpy2 - 2.0.x is out. The SourceForge pages offer to download: - the source package (for UNIX-alikes, which comprises Mac OS X) - win32 builds (for Microsoft's Windows - contributed by Laurent Oget from Predictix) - the HTML documentation The next releases in the 2.0

Re: [Rpy] future of rpy 1.0

2008-12-01 Thread Laurent Gautier
Peter wrote: > On Mon, Dec 1, 2008 at 2:42 AM, Mario Beauchamp <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I was just wondering... now that rpy 2.0 seems to be the new thing, >> does that mean rpy 1.0 will die? I am not ready yet to go 2.0 and I >> still depend on windows installers for newer versions

Re: [Rpy] future of rpy 1.0

2008-12-02 Thread Laurent Gautier
Mario Beauchamp wrote: > Hi Greg, > > On Mon, Dec 1, 2008 at 10:39 AM, Warnes, Gregory R. > <[EMAIL PROTECTED]> wrote: >> RPy 1.0 will continue to exist, and bug fixes will be made, but feature >> enhancements will occur in RPy2 > > Fair enough. > >> I'll try to create a Windows installer for 2.

Re: [Rpy] future of rpy 1.0

2008-12-02 Thread Laurent Gautier
Mario Beauchamp wrote: > Hi, > > On Mon, Dec 1, 2008 at 5:30 AM, Peter <[EMAIL PROTECTED]> wrote: >> Hopefully the backward compatibility interface in rpy 2.0 will >> eventually make upgrading from rpy1 to rpy2 simple. > > I will eventually make the upgrade but since rpy is bundled into my > soft

Re: [Rpy] RPy2 fails on Windows and R-2.8.0

2008-12-02 Thread Laurent Gautier
Peter wrote: > On Tue, Dec 2, 2008 at 11:50 AM, Marcos Silva <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I made the changes suggested. >> >> - I created a R_HOME variable in windows with value "C:\Program >> Files\R\R-2.8.0" >> - "import win32api" is OK in my Python installation >> >> From R I get:

Re: [Rpy] RDataFrame to Python objects?

2008-12-09 Thread Laurent Gautier
RDataFrame *is* a Python class. There are many ways to cast it into a different data structure, if you wish to do so. If going for a list of lists: lolist = [[x for x in y] for y in dataf] Note that going to a Python dictionary is not the most robust of the ideas (there might be several elemen

Re: [Rpy] RDataFrame to Python objects?

2008-12-09 Thread Laurent Gautier
Edit to the PS in my previous post: I did have the time to make RVectors use R's "[". use ".r[", e.g. dataf.r['Var1'] L. Carlos Jesus Anderson wrote: > Hi, > > How may I convert an RDataFrame into Python objects? I used the read.table > function in R to read in data (from Python), but now

Re: [Rpy] RDataFrame to Python objects?

2008-12-09 Thread Laurent Gautier
ings to "string1", "string,", etc). I'm not sure what this structure > means, but I just want to get the strings as a list. Oddly enough, when > I type print(data), it correctly prints out the strings, not the numbers. > > Thanks, > > Carlos > > Q

Re: [Rpy] RDataFrame to Python objects?

2008-12-09 Thread Laurent Gautier
s read.table() > I just need to figure out how to convert > them back to strings. One way is to use R's as.character(). > Seems like my problem is more of an R issue than > an rpy2 issue. Still, I wonder how print() is able to properly pull out > the correct strings. >

Re: [Rpy] Accessing lm() elements

2008-12-12 Thread Laurent Gautier
laurent oget wrote: > I do std-error=r['$'](summary,'sigma') Smart use of "$". Other possible way: summary.r["sigma"][0][0] > I think r.names(summary) will give you the components. It gives the names of the components. Consider the following example: import rpy2.robjects as ro fit = ro.

Re: [Rpy] Accessing lm() elements

2008-12-12 Thread Laurent Gautier
Gary Strangman wrote: > Hi again, > > Forgive me if this is a completely silly question for rpy2. I'm trying to > wean myself from rpy, but am confused by the new approach to conversion. > If I fit a model and collect summary info as follows ... > > fit = robjects.r.lm(fmla,data) > summary = ro

Re: [Rpy] Accessing lm() elements

2008-12-13 Thread Laurent Gautier
Gary Strangman wrote: > >>> (Intercept) 10.9205792 2.9934159 3.6481997 0.001341692 >>> prerbmt 0.4226101 0.1729016 2.4442236 0.022599474 >>> mri -0.3495370 0.7497424 -0.4662095 0.645450898 >>> >>> ... and if I want the estimate for the 2nd coefficient ... >>> >> print summary

Re: [Rpy] Dataframe conversion question

2008-12-13 Thread Laurent Gautier
Gary Strangman wrote: > Hi again, > > I have a list-of-lists that I want to convert to an R dataframe. (In R, it > should end up as 306 rows by 12 columns.) The rpy2 instructions suggested > in this forum were basically: (1) convert my list of lists to a list of > array.array()s, (2) convert ea

Re: [Rpy] Not getting the same result presented in RPy2 manual

2008-12-15 Thread Laurent Gautier
The API changed between the moment this was first written and the release 2.0.0. You want: letters.r_repr() (the fix to the doc is in SVN for one or two days). L. Marcos Silva wrote: > Hi People, > > What is wrong with these two piece of code? > > The following is an example presented in

Re: [Rpy] Not getting the same result presented in RPy2 manual

2008-12-16 Thread Laurent Gautier
ou may consider using R's sink function in order to circumvent both the fact that "stem" is not returning anything and that I/O is problematic under win32. > Thanks in advance. > (I will read the the fixes to the doc is in SVN as soon as possible.) 2.0.1 will have i

Re: [Rpy] Problem with R's hist() function

2008-12-17 Thread Laurent Gautier
Peter wrote: > On Wed, Dec 17, 2008 at 1:00 AM, Marcos Silva wrote: >> Hello People, it's me again... >> >> I tried to use the R's hist() function, using this code: >> >> hist = robjects.r['hist'] >> x = robjects.FloatVector(dataset) >> hist(x) >> ... >> But the graphic that I got was very strang

Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-02 Thread Laurent Gautier
James Yoo wrote: > > Sorry for the redundant post, but I felt that I should change the > subject header. > On Fri, Jan 2, 2009 at 11:31 AM, James Yoo > wrote: > > Hi, > > Running into a couple problems compiling rpy2 on windows. > I have R_HOME defined a

Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-03 Thread Laurent Gautier
her errors you encounter, I am afraid that you are on your own: all compilations for win32 I know of used mingw instead of msvc. L. > > On Fri, Jan 2, 2009 at 2:18 PM, Laurent Gautier <mailto:lgaut...@gmail.com>> wrote: > > James Yoo wrote: > > >

Re: [Rpy] load R-library via rpy2

2009-01-07 Thread Laurent Gautier
Hi Oliver, '(' is not '['. Check http://rpy.sourceforge.net/rpy2/doc/html/introduction.html#calling-r-functions then http://rpy.sourceforge.net/rpy2/doc/html/robjects.html?highlight=evaluate#strings-as-r-code and eventually http://rpy.sourceforge.net/rpy2/doc/html/robjects.html?highlight=evaluate

Re: [Rpy] calling R-functions

2009-01-07 Thread Laurent Gautier
Oliver Tomic wrote: > Hi again, > > I am reading the documentation but I must be missing something. When I > try this from the documentation everything works fine: > > import rpy2.robjects as robjects > rsum = robjects.r['sum'] > res = rsum(robjects.IntVector([1,2,3])) > > > > Here, however I

Re: [Rpy] is rpy2 the default supported python module now

2009-01-08 Thread Laurent Gautier
paul jobs wrote: > http://www.bitbucket.org/lgautier/rpy2/ > Where can i hg pull rpy2 ? > the above site is down Seems to be up at the moment. If you are starting with rpy2, consider sticking to the 2.0.x branch (latest release being 2.0.1) for the time being. The truck (2.1.x-dev) should not b

Re: [Rpy] rpy on Windows

2009-01-08 Thread Laurent Gautier
The current (rpy2-2.0.1) r_repr() method used indeed to be __repr__(). There are places in the documentation that were not updated, as you point it out. This was changed to avoid flooding accidentally the console during interactive sessions. It is sometimes hard to anticipate what R functions r

Re: [Rpy] is rpy2 the default supported python module now

2009-01-10 Thread Laurent Gautier
32 and '.r_repr()' added here and there in the doc (in order to match the real output from the console). > On 1/8/09, *Laurent Gautier* <mailto:lgaut...@gmail.com>> wrote: > > paul jobs wrote: > > http://www.bitbucket.org/lgautier/rpy2/ >

[Rpy] rpy2-2.0.1 on win32

2009-01-10 Thread Laurent Gautier
Hi, The binary for rpy2-2.0.1 on win32 is now available on the SourceForge download page (thanks to Laurent Oget). Laurent -- Check out the new SourceForge.net Marketplace. It is the best place to buy or sell service

Re: [Rpy] Rpy and concurrency

2009-01-12 Thread Laurent Gautier
Two things. rpy2.rinterface if making sure that R gets initialized only once (otherwise everything breaks), which translates at the level of rpy2.robjects as a singleton pattern (r singleton of class R). For evaluating R code, the locking is somehow ensured by Python's GIL. All access

Re: [Rpy] playwith

2009-01-12 Thread Laurent Gautier
Currently, I think that your only hope is that the package "playwith" is working when called from rpy2. I have something like that on my TODO list, but I am not sure on when, and if I can find the time to do it. L. Jan Wijffels wrote: > Hi, > > I was wondering how something like > > libr

Re: [Rpy] Rpy and concurrency

2009-01-12 Thread Laurent Gautier
> > L > > > 2009/1/12 Laurent Gautier mailto:lgaut...@gmail.com>> > > Two things. > > rpy2.rinterface if making sure that R gets initialized only once > (otherwise everything breaks), which translates at the level of > rpy2.robjects a

Re: [Rpy] Rpy and concurrency

2009-01-12 Thread Laurent Gautier
Laurent Gautier wrote: > No need. Because of the GIL, a C call has to return before any thread > can proceed (or so I think - I have tried or investigated this in > details at the moment). edit: I have *not* tried. > laurent oget wrote: >> But in any case no global betwe

Re: [Rpy] compiling rpy2 on windows R-2.8.1

2009-01-12 Thread Laurent Gautier
status 1 > > > On Mon, Jan 12, 2009 at 11:49 AM, James Yoo <mailto:james@gmail.com>> wrote: > > Hmmm, I'm trying to use mingw to compile rpy2. I've setup my paths > to only include R, Rtools, mingw... but for some dang reason, > setup.py keep

  1   2   3   4   5   6   7   >