Skip to content

crossing and nesting no longer supports lazy evaluation #820

@atusy

Description

@atusy

On tidyr 0.8.3, tidyr::crossing and tidyr::nesting used tibble::lst to capture dots, and supported lazy evaluation of arguments.
On tidyr 1.0.0, they use tidyr:::dots_cols, and no more support lazy evaluation.
Is this intended or unexpected?

tidyr 1.0.0

tidyr::crossing(x = seq(-2, 2), y = x)
#> Error in .f(.x[[i]], ...): object 'x' not found

tidyr 0.8.3

tidyr::crossing(x = seq(-2, 2), y = x)
#> Loading tidyr
#> # A tibble: 25 x 2
#>        x     y
#>    <int> <int>
#>  1    -2    -2
#>  2    -2    -1
#>  3    -2     0
#>  4    -2     1
#>  5    -2     2
#>  6    -1    -2
#>  7    -1    -1
#>  8    -1     0
#>  9    -1     1
#> 10    -1     2
#> # ... with 15 more rows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorpivoting ♻️pivot rectangular data to different "shapes"

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions