dtplyr icon indicating copy to clipboard operation
dtplyr copied to clipboard

rowwise not applicable

Open verajosemanuel opened this issue 3 years ago • 7 comments

As documentation states, dtplyr seems to include all dplyr 1.0 verbs. But got an error when trying to use rowwise (maybe I am wrong and this verb is not included)

https://www.tidyverse.org/blog/2020/04/dplyr-1-0-0-rowwise/

 mtcars2 <- lazy_dt(mtcars)

mtcars2 %>% rowwise()

Error in UseMethod("rowwise") : 
  no applicable method for 'rowwise' applied to an object of class "c('dtplyr_step_first', 'dtplyr_step')"

verajosemanuel avatar Apr 12 '21 07:04 verajosemanuel

Sorry for the late response on this one. rowwise() is not currently implemented in dtplyr. We should be able to implement this when the newest version of data.table is on CRAN.

This new feature is the one we're waiting on.

markfairbanks avatar Apr 22 '22 03:04 markfairbanks

Any update on this @markfairbanks ?

kurttaylor avatar Aug 09 '22 10:08 kurttaylor

@kurttaylor we’re still waiting on the next CRAN release of data.table for the feature to be available. Until then we won’t be able to add it to dtplyr unfortunately.

data.table‘s last CRAN release was Feb 2021. I’m not sure why it has been so long since their last release, so it’s tough to guess when their next one might be. Hopefully in the next few months.

markfairbanks avatar Aug 09 '22 12:08 markfairbanks

Looks like data.table might have finally pushed the necessary release to CRAN?

bachlaw avatar Feb 03 '23 02:02 bachlaw

They've had a few mini-releases since v1.14.0 in Feb 2021 (v1.14.2, v1.14.4, and v1.14.6), however these were all fixes intended to pass new CRAN requirements. All new features since v1.14.0 are still in the development version.

The addition we're waiting on is number 39 in the development version news:

39. .I is now available in by for rowwise operations, https://github.com/Rdatatable/data.table/issues/1732.
Thanks to Rafael H. M. Pereira for requesting, and Benjamin Schwendinger for the PR.

markfairbanks avatar Feb 03 '23 02:02 markfairbanks

It appears with the recent v1.15.0 data.table release in January the .I function is now available for rowwise operations per their news and reference manual update. Do you anticipate the updated being integrated into the next dtplyr release?

DanSimonet avatar Mar 14 '24 18:03 DanSimonet

Do you anticipate the updated being integrated into the next dtplyr release?

Yep, I think that's a very realistic goal

markfairbanks avatar Mar 14 '24 23:03 markfairbanks