Skip to content

Lcb/slide unnest dedupe cols #521

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

Merged

Conversation

brookslogan
Copy link
Contributor

@brookslogan brookslogan commented Sep 6, 2024

Checklist

Please:

  • Make sure this PR is against "dev", not "main" (unless this is a release
    PR).
  • Request a review from one of the current main reviewers:
    brookslogan, nmdefries.
  • Makes sure to bump the version number in DESCRIPTION. Always increment
    the patch version number (the third number), unless you are making a
    release PR from dev to main, in which case increment the minor version
    number (the second number).
  • Describe changes made in NEWS.md, making sure breaking changes
    (backwards-incompatible changes to the documented interface) are noted.
    Collect the changes under the next release number (e.g. if you are on
    1.7.2, then write your changes under the 1.8 heading).
  • See DEVELOPMENT.md for more information on the development
    process.

Change explanations for reviewer

Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch

TODO

  • iron out some issues identified by CHECK
  • rebase/merge
  • epi_slide col dedupe
  • docs/etc.

brookslogan and others added 4 commits September 4, 2024 03:40
Moving from `group_modify` to `group_map` means doing our own labeling. Handle a
corner case here in a way similar to `group_modify` (if you think of `version`
being a non-dropping factor at the beginning of the grouping columns). It's not
clear this behavior is what we want... perhaps we want to generate errors if we
ever have NAs generated from this not-a-nondropping-factor
version/grouping-column following a nondropping-factor version/grouping-column.
Or at least warn in the subcase of this when a user requests an empty version
when `.drop = TRUE` or `.drop = FALSE` but there are nonfactor columns.

Tweak the `.drop = FALSE` warning that tries to ward against some of the above
cases (but is only thinking about grouping columns rather than version +
grouping columns) so that it won't warn if there are 0 grouping columns. It
makes sense that a user may have a set of potential factor grouping columns and
programmatically try models with different grouping column sets and `.drop =
FALSE`, including an empty grouping column set.
@dshemetov
Copy link
Contributor

Related #509

@brookslogan brookslogan mentioned this pull request Sep 10, 2024
4 tasks
brookslogan and others added 4 commits September 12, 2024 15:40
This has the core of the concept, but geo-grouped epi_slides will decay to
tibble due to the move from group_modify -> group_map without reconstructing
afterward.  But planned changes to use `.keep = TRUE` should also serve to
address this issue.
See #475. We have the ability to catch this consistently now since we are using
`.keep = TRUE`, so the .x into each slide computation is an `epi_df` even if
we're grouping by `geo_value` (previously, .x would have decayed into a tibble
and we shouldn't override tibble's behavior).

Also add missing `group_map` import.
@brookslogan brookslogan force-pushed the lcb/slide-unnest-dedupe-cols branch from d209619 to e1d300d Compare September 13, 2024 10:54
@brookslogan brookslogan marked this pull request as ready for review September 13, 2024 19:44
Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a few comments to the epi_slide part.

@brookslogan brookslogan merged commit 9ab9731 into lcb/slide-improvements-2024-06 Sep 16, 2024
1 check passed
@brookslogan
Copy link
Contributor Author

Merging now as this has the essentials for rebasing 519. Cleanup to proceed off of slide improvements branch. Will migrate in some way

@dshemetov dshemetov deleted the lcb/slide-unnest-dedupe-cols branch September 19, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants