Skip to content
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

count(.by = ) #7112

Open
krlmlr opened this issue Dec 18, 2024 · 0 comments
Open

count(.by = ) #7112

krlmlr opened this issue Dec 18, 2024 · 0 comments

Comments

@krlmlr
Copy link
Member

krlmlr commented Dec 18, 2024

I accidentally used the syntax below, and wonder if this should be the default recommended one, or at least a supported alternative.

options(conflicts.policy = list(warn = FALSE))
library(dplyr)

tibble(a = 1:3) |>
  count(.by = a)
#> # A tibble: 3 × 2
#>     .by     n
#>   <int> <int>
#> 1     1     1
#> 2     2     1
#> 3     3     1

Created on 2024-12-18 with reprex v2.1.1

It took me a while to understand why there's a .by column in the output.

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

No branches or pull requests

1 participant