Peter wrote: >> Does the rpy v1 style r.dev_off() still work in rpy v2?
Laurent replied: > Not directly. I have a sketchy attempt at making it possible (will be > there for the 2.0 release, still scheduled for November), but it will > not be the default. > >> Personally I >> much prefer this to r['dev.off']() for readability. > > This is indeed saving 4 keystrokes, but have the significant > disadvantage of being the likely source of a lot of problem to the > unaware user. There is also the strong advantage of supporting r.dev_off() and similar for people wanting to port existing code from rpy1 to rpy2. If this supporting this kind of "name mangling" could be enabled at or just after the import lines, that could be very helpful. [Have you written anything about converting existing rpy1 code to rpy2? I should probably read it if you have...] > What if there is a user-defined function called 'dev_off' in the R > search path ? > > To save you the effort of starting comments on conversion rules such as > * '.' -> '_' > * '_' -> '__', > I'll be bringing up that '___' in python cannot be disambiguated (can > be either '._' or '_.' in R). > > rpy2 will be trying to be 'safe by default'. I believe that prior to R version 1.9, R didn't originally allow underscores in function names / arguments / variables, which would explain why rpy1 did the dot/underscore switching in the first place. >From the pry point of view, its annoying that R now allows both dots (peridods) and underscores :( 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