On Tue, 2008-10-14 at 10:57 +0100, Peter wrote:
> Laurent wrote:
> >>try:
> >>
> >>import rpy2.robjects as ro
> >>ro.r._dotter = True
> >>ro.r.dev_off()
> 
> Andrew wrote:
> > Rather than have a toggle, why not have an alternate proxy object - then
> > you don't polute your new API implementation with legacy support. For
> > example:
> >
> >    from rpy2 import compat as r
> >    r.dev_off()
> 
> Yes - I think this is what Laurent has in mind with the "rpy_classic" module:

Not completely, but I clearly overlooked the fact that such backward
compatibility through import statements are common practice in Python.
That's an interesting suggestion from Andrew... let me think on how I
can tie that together.

I am also seeing two separate points here:
- provide the '.'-to-'_' feature as an option for rpy2's robjects
- provide full/limited backward compatibility with rpy-1.0 as a module
(so legacy rpy code can run as such)


> Earlier in this thread Laruent wrote:
> > There is also a module "rpy_classic" that is a rough emulation of rpy
> > built with rpy2.rinterface (the emulation is rough because of limited
> > time on my end - this is also a demo of how how could build an interface
> > to R without touching on C code).
> 
> If this can be tested, then I sounds like it should be the recommended
> route for converting rpy1 code for rpy2.

May be not what you are expecting. The aim of rpy_classic is to have rpy
code running without (much) modification.

> Laurent, could you show us how you would write this trivial plot
> example (at the start of this thread) using rpy2.rpy_classic?

This example was chosen because it is simpler(*) to do it with the rpy2
interface than with rpy (no CONVERSION juggling for example).

(*: I might be biased here).

Is it still necessary to know it from the clarifications above ?



L.


> Thanks
> 
> Peter
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to