[Rpy] Repeated measure ANOVA : formula and summary problem

2007-12-18 Thread Etienne Gaudrain
Hi everyone, I'm new to RPy, and I came to this terrific module as I was used to make some of my analyses in R, and I came to Python in replacement of Matlab. Formerly, I manipulated data with Matlab, put it in a MySQL database, and made my stats in R via ODBC. I'm now thinking about jumping o

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] Repeated measure ANOVA : formula and summary problem

2007-12-18 Thread Etienne Gaudrain
Ok, I guess this should work, thank you very much! However, it means that I have to make an R file everytime I make a different analysis. Of course, I could easily make a Python function that create the R file and call it... etc... Maybe I'm a purist, but this juste looks like hacking... isn't it

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

2007-12-18 Thread Toby Hocking
Hi Etienne, I don't think you have to make a new R file every time, you just have to make it once and call r.source("file.R") every time. Then use your R function with a new dataset. This type of data flow works great for me, and I think it is rather the opposite of hacking, since you achieve 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 Etienne Gaudrain
Hi Toby, You're right that I can call the R file as many time I want, even if add some subjects in my experiment. However, I need Python because I make some treatments on my data before analysing it (e.g. some fittings with non linear functions...). I could probably make the same directly in R

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

2007-12-18 Thread Etienne Gaudrain
Hi Gregory, This is good to know! I'll try this. Thank you very much !! I imagine that the fact that the fact that av will be a true R object will help the summary() function to find the good method summary.aov(). However, I tried to call explicitly summary_aov() with no success. But I have to t

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

2007-12-18 Thread Gregory Warnes
Hi Etienne, > > I imagine that the fact that the fact that av will be a true R object > will help the summary() function to find the good method summary.aov > (). Not only do you need to have R call the correct R fucntion, it must have a correct R object. When the conversion R-->Python happe

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

2007-12-18 Thread Etienne Gaudrain
Ok! Thank you very much!!! -Etienne Gregory Warnes a écrit : > Hi Etienne, > > >> I imagine that the fact that the fact that av will be a true R object >> will help the summary() function to find the good method summary.aov >> (). >> > > Not only do you need to have R call the correct R

[Rpy] a question about SCALE function.

2007-12-18 Thread zhang chi
I find a scale function in R language. But in Rpy, I can't use r.scale(), is there a scale() function in Rpy? this is my first use mail list , I don't know if I mail this message to the correct address. If I disturb, I am very sorry about it . good luck -