2008/10/9 Peter <[EMAIL PROTECTED]>:
>>> r.dev.off()
>>> ...
>>> LookupError: 'dev' not found
>>
>> Python is not R. The dot ("."), like in a large number of other
>> language, has a particular semantic meaning and therefore is
>> not a valid character for variable names.
>>
>> r['dev.off']() is what you are looking for.
>
> Does the rpy v1 style r.dev_off() still work in rpy v2?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. 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'. > 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 > [email protected] > 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 [email protected] https://lists.sourceforge.net/lists/listinfo/rpy-list
