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)

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")

-- 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

Reply via email to