On Mon, Feb 8, 2010 at 3:23 PM, B.A.D.C.M.D Santos <bac...@cam.ac.uk> wrote: > > Hello all, > > I spent the weekend experimenting with the faithful.py example at > http://rpy.sourceforge.net/rpy_demo.html. I have made much progress getting > parts of it to work. The following is a summary of issues to date: > > 1) rpy does not read the two-digit minor release number in the current > version of R. This group informed me of a patch, which I just learned of > this morning.
It sounds like there is enough interest to do another maintenance release of rpy 1.x to fix this issue. > Since I am just starting into the RPy world, I think I will > move forward with rpy2. That is a good choice in the long run. > 2) rpy2 does not appear to understand the following code from the example: > > for k in edsummary.keys(): > print k + ": %.3f" % edsummary[k] > > rpy2 works in a almost complete different way than rpy. You have the read > the documentation for rpy2 and not rpy. Check the documentation for it > here: http://rpy.sourceforge.net/rpy2/doc/html/index.html rpy2 is not backwards compatible with rpy (v1). This means the rpy (v1) examples like the faithful.py will not work as is on rpy2. > 3) rpy2 does not deal with the "dot" conversion in the same way as rpy. > This is a big hurtle for me. The "faithful" example uses the following R > objects: > > r.dev_off() > r.shapiro_test() > r.ks_test() > There is a workaround for the dot conversion here: > http://rpy.sourceforge.net/rpy2/doc/html/robjects.html#functions > > To call objects from the R base package you just need to do the following: > import rpy2.robjects as robjects > phyper = robjects.r('phyper') > shapiro = robjects.r('shapiro.test') As noted above, rpy2 does things differently. There are good reasons for this (e.g. R now allows both dot and underscore in argument names, while historically it did not allow dots). Regards, Peter ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list