%R select(flights, -(year:day) )

Issue #253 new
Big Stone created an issue

Hi all,

I'm replaying, with R3.1.2 installed and rpy2-2.5.4 the "dplyr_pandas" notebook of Thomas Augspurger, but removing comments and replacing them by %R

All that under python3.4.2 64 bit, windows, IPython2.3.


I did this workaround first

import rpy2
%load_ext rpy2.ipython
from rpy2.robjects.conversion import ri2py
from rpy2.ipython.rmagic import ri2ipython
ri2ipython.register(rpy2.robjects.Sexp, ri2py)

All is good until this curious error, that I don't forsee the origin :

%R select(flights, -(year:day) )
UsageError: unrecognized arguments: -(year:day) )

Does anoyne have an idea of what I missed ? could it be a bug induced by Ipython parser ?

Comments (6)

  1. Big Stone reporter

    If I do

    select(flights, -(year:day) ) 

    all is ok but the result goes on the dos console instead of ipython cell

  2. Laurent Gautier

    python %R select(flights, -(year:day) ) UsageError: unrecognized arguments: -(year:day) )

    This is presumably because the handling %R is expecting hyphen-prefix options. @davclark might know more about this.

    If I do python %%R select(flights, -(year:day) ) all is ok but the result goes on the dos console instead of ipython cell

    I believe this is what issue #252 is reporting. No official support for Windows, but patches and pull requests would be considered.

  3. Laurent Gautier

    Yes, unfortunately there are not many contributions for Windows support... and when there are some it is difficult to get a confirmation that the fix is working for several people (see issue #191 - that fix ended in 2.5.6 but I still do not know whether it is fixing anything).

  4. Big Stone reporter

    Do you know in which part of the toolchain the string -(year:day) is wrongly decoded ? what program generates the message unrecognized arguments ? (if it's somewhere on the python side, I can digg myself, but I need a starting point, was lost trying to figure out in all that magic)

  5. Log in to comment