src_dt no longer in dplyr as of dplyr 0.5

Issue #357 resolved
brantp created an issue

src_dt assignment at line 181 of rpy/robjects/lib/ is no longer viable as of dplyr 0.5, as Hadley has moved this out to the new "dtplyr" package. With this additional package installed (in R), the logic at line 181 now works as:

dtplyr = importr('dtplyr')
src_dt = dtplyr.src_dt

It's also possible that the right answer is to remove src_dt from and look more closely at whether the dtplyr package wants its own rpy2 wrapping module...

(all of the above encountered on rpy2 2.8.1, dplyr 0.5.0)

Comments (8)

  1. Laurent Gautier

    Thanks for the thorough report.

    I addition to fixes for dplyr 0.5, I should also add a resilience layer for the interfaces to the R packages shipping with rpy2 (ggplot2, dplyr, and tidyr). Something that would at least least the Python module load to allow monkey patching.

  2. Laurent Gautier

    initia fix with revision 748ddd789246 (branch default) or 5d6ad1631a3a (branch version_2.8.x). The module is now importing successfully (although not everything is working). The strategy used will likely be applied to ggplot2 and tidyr, making all three able to go through future possible API breaking changes in the R packages.

  3. Laurent Gautier

    The fix with revision 34d9fc40ec37 in branch version_2.8.x (c4fcc5a83c1c for the branch default) should normally be the one making to rpy2-2.8.2 in about a week from now.

    rpy2.robjects.lib.dplyr.src_dt will be None if the R package dplyr is discovered to be missing src_dt (and a warning issued). The R package dtdplyr is not used because it is only suggested by R's dplyr (not required). This behavior might change in the branch default as its development continues. One possibility is that dtplyr will have its own interface, as you suggest it.

  4. Laurent Gautier

    The fix was expanded to cover all R packages defined in rpy2.robjects.lib. rpy2-2.8.2 will have these changes, and will normally be released by the end of the week-end.

  5. Log in to comment