Skip to content

Syntax for temporary grouping #4711

Closed
@hadley

Description

@hadley
Member

Syntax ideas:

df %>% with_groups(mutate, this, that)(foo = 1)

df %>% with_groups(c(this, that), mutate, foo = 1)

Activity

romainfrancois

romainfrancois commented on Jan 8, 2020

@romainfrancois
Member

I think I prefer the second one. I suppose we could make it compatible to this as well:

df %>% with_groups(c(this, that), ~ mutate(., foo = 1))
hadley

hadley commented on Jan 8, 2020

@hadley
MemberAuthor

Ah yes, nice! And that actual solves a tidy-eval challenge I was having

added a commit that references this issue on Jan 14, 2020
91c4d6e
added a commit that references this issue on Jan 15, 2020
56c2197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @hadley@romainfrancois

      Issue actions

        Syntax for temporary grouping · Issue #4711 · tidyverse/dplyr