-
Notifications
You must be signed in to change notification settings - Fork 8
Review and consider applying ?dplyr_extending
for epi_df
#223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Might have ran into one of these cases in #64 where grouped May also related to #117, cmu-delphi/epipredict#51. |
* Fix failing grouped `epix_slide` test, where `group_modify` dropped the `epi_df` class when binding results together, by implementing `dplyr_reconstruct.epi_df`. * Implement the rest of `?dplyr_extending` and remove some now-unnecessary S3 methods for dplyr verbs, addressing #195, #223, and changing `epi[x]_slide` to leave grouping intact. * Update tests for grouped slides to reflect new behavior. * Update NEWS.md.
* Half-fix failing grouped `epix_slide` test, where `group_modify` dropped the `epi_df` class when binding results together, by implementing `dplyr_reconstruct.epi_df`. Somehow a session documenting and testing immediately before this commit and then after it will have the tests pass, but the tests won't pass off of this branch directly. The class vector involved in the failure does appear to change. * Explicate `epix_slide` `count` derivation. * Implement the rest of `?dplyr_extending` and remove some now-unnecessary S3 methods for dplyr verbs, addressing #195, #223, and changing `epi[x]_slide` to leave grouping intact. * Update tests for grouped slides to reflect new behavior. * Update NEWS.md.
…modify` * Implement `?dplyr_extending` and remove some now-unnecessary S3 methods for dplyr verbs, addressing #195, #223, and failing `epix_slide` test. * Don't ungroup `epix_slide` result. Update corresponding test. * Update NEWS.md. * Explicate `epix_slide` `count` derivation in comments and variable names. * Fix some desynced duplicated code in `epix_slide` and use `group_modify` again instead of `summarize` in order to keep slide computation input available as an `epi_df`.
…modify` * Implement `?dplyr_extending` and remove some now-unnecessary S3 methods for dplyr verbs, addressing #195, #223, and failing `epix_slide` test. * Don't ungroup `epix_slide` result. Update corresponding test. * Update NEWS.md. * Explicate `epix_slide` `count` derivation in comments and variable names. * Fix some desynced duplicated code in `epix_slide` and use `group_modify` again instead of `summarize` in order to keep slide computation input available as an `epi_df`.
…modify` * Implement `?dplyr_extending` and remove some now-unnecessary S3 methods for dplyr verbs, addressing #195, #223, and failing `epix_slide` test. * Don't ungroup `epix_slide` result. Update corresponding test. * Update NEWS.md. * Explicate `epix_slide` `count` derivation in comments and variable names. * Fix some desynced duplicated code in `epix_slide` and use `group_modify` again instead of `summarize` in order to keep slide computation input available as an `epi_df`.
A potential issue with |
There are a few other issues with grouped epi dfs in the current
1(a) and 2 (and maybe more points) seem to conflict. One potential resolution:
|
While applying the "potential resolution" above seems to help in some aspects, it also loses [Same approach would need to be applied for rowwise edfs. Plus, in any approach, we will want to review tidyr for more methods that may need wrapped like, e.g., |
More recent reference: tidyverse/dplyr#5480 Also, I'm not sure if the approaches with a separate |
Progress is in |
The questions raised by how to reconstruct a grouped summarize might tie into questions about when |
Another point where things seem unclear: should we drop metadata in an |
Having an |
Some notes:
|
|
For _type validation with row binding ops without custom col classes, might try tacking on vctrs_vec. |
Any lessons learned from |
Doing a small patch on a branch to avoid forwarding to dplyr_reconstruct.grouped_df needlessly on a bunch of operations where proper grouping has already been taken care of. [perf stopgap until I actually have time to port over the dplyr.extending.test stuff] |
@dshemetov I have some of an implementation ready there, but it still just feels pretty messy / not very crystallized, because a lot of functions aren't just going from type A to type B; instead, it's like, a maybe-valid-maybe-invalid type A to a valid type A, or a maybe-valid-maybe-invalid-A-or-a-data-frame-or-a-grouped_df-or-actually-maybe-a-non-data-frame-as-well, and each possibility might need to map to a different type or set of possible types. It seems like I have a lot of helpers proliferating due to the number of different typeset -> typeset conversions are needed. |
I believe that we implemented
epi_df
without the use of?dplyr_extending
. We may have:We should review
?dplyr_extending
to see if it hints at bugs, enhancements, code simplifications, etc. (E.g., the mention of[
might have hinted that we would want a[
implementation before we discovered it on our own.)The text was updated successfully, but these errors were encountered: