Skip to content

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

Open
@ndunnewind

Description

@ndunnewind

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions