Nathaniel Smith wrote:
> On Thu, Oct 1, 2009 at 10:48 AM, Warnes, Gregory R.
> <gregory.war...@rochester.edu> wrote:
>> These are the longstanding rpy rules (where 'x' represents any sequence
>> of valid name character in *python*, including A-Z, a-Z anywhere and 0-9
>> anywhere except in the first position):
>>
>> python  R               Example
>> x_x             x.x             print_default(m) --> print.default(m)
>> x_              x               print_(m) --> print(m)

By-the-way, is the later (x_ -> x) used for anything outside "print" ?
(if so, note that print is becoming a regular function in Python 3)

> Heh -- convergent evolution, then, since I never actually used "classic" rpy.
> 
>> However, the (proposed?) translation of 'dollar' to '$' seems
>> problematic to me, since the string/word 'dollar' can reasonably be
>> expected to appear in variable names.
>>
>> What do you have in mind for that?
> 
> NB: I just double-checked the code, and it's specifically if the name
> equals "dollar" exactly then it is translated to "$" -- names that
> merely contain "dollar" as a substring are unaffected.
> 
> I think this meets the definition of a "miswart":
>   http://www.websters-online-dictionary.org/mi/miswart.html
> it's ugly looking, but in practice the ability to conveniently access
> columns from data frames, etc., outweighs the ugliness. (Of course, if
> anyone has an even *better* idea for how to do this, I'd love to hear
> it. Typing "dollar" is somewhat ridiculous. I just couldn't deal with
> typing r["$"] all the time for such a fundamental operation.)
> 
> The way it looks in practice:
>   R: stackloss$Air.Flow
>   Python (rnumpy-style): stackloss.r.dollar("Air.Flow")

To a large extent, the dollar ("$") operator is an alias for
the "[[" extraction of elements.

The proposed scheme in rpy2-2.1 is hopefully of equal convenience, and 
is looking like follows:

# [[ or $ ( "R extract 2", "rx2")
stackloss$Air.Flow -> stackloss.rx2("Air.Flow")

# [ ("R extract", "rx")
stackloss["Air.Flow"] -> stackloss.rx("Air.Flow")





L.


> -- Nathaniel
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to