Re: [Rpy] Rpy import error in django app

2009-05-24 Thread Toby HOCKING
Yes this is a bizarre error that I had been getting. It was difficult to track down exactly where the bug came from, but it was somehow related to the C stack limit size, which was evidently too small and causing the R process to crash ... only when used in conjunction with RPy and Django (bi

Re: [Rpy] unicode support

2009-04-28 Thread Toby HOCKING
rs D[k]=[x.encode("UTF-8") for x in v] return D Quoting Toby HOCKING : > Hi fellow RPy-ers, long time no chat, hope everything is going well > for you all, > > Maybe you guys remember me --- I emailed the list a year or so ago and > I had a problem with un

[Rpy] unicode support

2009-04-27 Thread Toby HOCKING
Hi fellow RPy-ers, long time no chat, hope everything is going well for you all, Maybe you guys remember me --- I emailed the list a year or so ago and I had a problem with unicode string conversion from Python to R using RPy1. Here is a webpage I just found with the relevant email http://a

[Rpy] unicode support

2009-04-27 Thread Toby HOCKING
One more thing: in R it seems accent strings have the encoding "UTF-8" whereas python strings come into R always with an unknown encoding. Maybe this has something to do with it? thock...@stagiaire-desktop:~/rpy$ R > Encoding("c") [1] "unknown" > Encoding("ç") [1] "UTF-8" thock...@stagiaire-d

Re: [Rpy] rpy and mod_python problem

2008-07-14 Thread Toby Hocking
c. 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 help, support and design discussion list Subject: Re: [Rpy] r

Re: [Rpy] rpy and mod_python problem

2008-07-07 Thread Toby Hocking
-2.7 with rpy and Apache2/mod_python/Django. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Toby Hocking Sent: Wednesday, June 25, 2008 9:29 AM To: RPy help, support and design discussion list Subject: Re: [Rpy] rpy and mod_python problem I'm inclin

Re: [Rpy] rpy and mod_python problem

2008-06-25 Thread Toby Hocking
Gautier Sent: Wednesday, June 25, 2008 11:45 AM To: RPy help, support and design discussion list Subject: Re: [Rpy] rpy and mod_python problem 2008/6/25 Toby Hocking <[EMAIL PROTECTED]>: > I'm inclined to think that it is NOT an inherent incompatibility problem with > mod_python and R

Re: [Rpy] rpy and mod_python problem

2008-06-25 Thread Toby Hocking
I'm inclined to think that it is NOT an inherent incompatibility problem with mod_python and RPy since I have a working Rpy/apache/mod_python system on top of Django. Relevant package versions for the working system are: Django-rev7716 Apache-2.0.55-4ubuntu2.3 mod_python-3.1.4-0ubuntu1.1 R-2.2.1

Re: [Rpy] rpy and mod_python problem

2008-06-24 Thread Toby Hocking
Hi Christof, did you ever resolve this problem? I am experiencing it now, and I was wondering what you did for a solution/workaround. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christof Winter Sent: Wednesday, June 11, 2008 12:58 PM To: rpy-list

Re: [Rpy] zero byte images

2008-06-16 Thread Toby Hocking
You also may want to try to use the PDF graphics device in R (function pdf) and then use convert (http://imagemagick.org) to make a PNG for viewing on the web. This is the method I have used with great success in my Django-dataplot package (http://django-dataplot.sf.net), which is a RPy plotting

Re: [Rpy] SPAM: SF.net SVN: rpy: [402] trunk/rpy

2008-01-28 Thread Toby Hocking
These new slice changes are breaking my rpy compilation: gcc -pthread -fno-strict-aliasing -g -Wall -fPIC -DWITH_NUMERIC=1 -DRPY_SHNAME=_rpy2021 -DINIT_RPY=init_rpy2021 -UPRE_2_2 -I/usr/lib/R/include -Isrc -I/usr/share/R/include -I/usr/include/python2.4 -c src/rpymodule2021.c -o build/temp.linu

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

2007-12-18 Thread Toby Hocking
m a purist, but this juste looks like hacking... isn't it a more straight forward way to do it ? Thank you again, your solution definetly solve my issue!! -Etienne Toby Hocking a écrit : > Why don't you put your R code in file.R: > > library('stats') > my.summary

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

2007-12-18 Thread Toby Hocking
Why don't you put your R code in file.R: library('stats') my.summary = function(Res) { av <- aov( score~factor+Error(id_subject/factor), data=Res) summary(av) } then from python: r.source("file.R") r.my_summary(Res) ??? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

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

2007-11-29 Thread Toby Hocking
Your problem is that R can't find your LAPACK library. Could it be that your use of forward slashes instead of backslashes here is confusing windows?? Try to use backslashes instead and see what happens. 'C:\Program Files\R\R-2.6.1/modules//lapack.dll': -Original Message- From: [EMA

Re: [Rpy] RPy won't compile

2007-11-06 Thread Toby Hocking
That worked, thanks! I was missing the python2.4-dev libraries (duh!) Toby -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dirk Eddelbuettel Sent: Monday, November 05, 2007 8:14 PM To: RPy help, support and design discussion list Subject: Re: [Rpy] RPy won't

Re: [Rpy] segfault on unicode string conversion

2007-10-17 Thread Toby Hocking
Thanks for the response, Gregory. But I need a bit more help. So far I am using the test python code from rpy import r r.print_(u'') r.print_(u' ') By inserting print statements into the RPy C code (rpymodule.c), I have determined that every time RPy accesses an R object, it goes through the C

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

2007-04-17 Thread Toby Hocking
Hey Erez, I don't know any reason why you are getting that error, but maybe this will help. You may want to check out the Biopython (biopython.org) interface to Clustalw. I'm using rpy together with the Clustalw biopython package, and everything seems to work fine. My package versions are: htt

Re: [Rpy] importing rpy

2007-04-11 Thread Toby Hocking
the easiest solution in my opinion is to use environment variables to tell rpy where R is -- this also tells rpy which version of R it is using. Set the R_HOME environment variable before starting python, i.e. set R_HOME=S:\users-science\thocking\selex\R-2.2.1 Good luck... -Original Message

Re: [Rpy] about the dim() function

2006-11-22 Thread Toby Hocking
Hi there Christian, I find it's easiest to use rpy if you minimize the number of data conversion steps you need. That is, write most of your code in R, wrap it in my.function, then call it from python via r.source("my.source.file.R") r.my_function(args) Rather than constructing a data frame in

Re: [Rpy] breakage of rpy in kubuntu edgy-eft

2006-10-31 Thread Toby Hocking
search your sys.path and see if the rpy package is on it. >>> import sys >>> print sys.path if not, add the path where you have rpy installed. TDH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jonathan E. Magen Sent: Tuesday, October 31, 2006 3:44 PM To:

Re: [Rpy] r['CRS']("+init=epsg:4214") returns NULL obj!

2006-09-25 Thread Toby Hocking
Not sure about this one but it seems like you have isolated the problem to the rpy library itself --- perhaps there is some problem with DLLs since this is an external package? -Original Message- From: xianfeng song [mailto:[EMAIL PROTECTED] Sent: Monday, September 25, 2006 9:39 AM To: rpy

Re: [Rpy] R-2.2.1 invocation error on WindowsXP

2006-09-25 Thread Toby Hocking
I've been experimenting with rpy for a few weeks now and it definitely seems that you are encountering a problem that can be fixed by putting the full path to your R executables in your PATH. Also another fix may be setting the R_HOME environment variable to the full path to the R-2.x.y directory.

[Rpy] Windows graphics not responding

2006-09-14 Thread Toby Hocking
> Hi all, > > Just wondering if anybody can help me with the following problem. > > I'm running R 2.3.1 and Python 2.4, and I've got rpy to work on windows, > but with one little glitch: > > Whenever I call a plotting function, the graphics window comes up and does > the plot, but then the windo