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

Weight column not removed by uncount() when using .data pronoun #1583

Open
ndunnewind opened this issue Nov 12, 2024 · 0 comments
Open

Weight column not removed by uncount() when using .data pronoun #1583

ndunnewind opened this issue Nov 12, 2024 · 0 comments

Comments

@ndunnewind
Copy link

I expected the weights column to be removed when using the .data pronoun in uncount().

df <- tibble::tibble(x = c("a", "b"), n = c(1, 2))

tidyr::uncount(df, n)
#> # A tibble: 3 × 1
#>   x    
#>   <chr>
#> 1 a    
#> 2 b    
#> 3 b

tidyr::uncount(df, .data$n)
#> # A tibble: 3 × 2
#>   x         n
#>   <chr> <dbl>
#> 1 a         1
#> 2 b         2
#> 3 b         2

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

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