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

crossing and nesting no longer supports lazy evaluation #820

Closed
atusy opened this issue Dec 2, 2019 · 1 comment
Closed

crossing and nesting no longer supports lazy evaluation #820

atusy opened this issue Dec 2, 2019 · 1 comment
Labels
bug an unexpected problem or unintended behavior pivoting ♻️ pivot rectangular data to different "shapes"
Milestone

Comments

@atusy
Copy link
Contributor

atusy commented Dec 2, 2019

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
@hadley
Copy link
Member

hadley commented Dec 5, 2019

This was accidental.

@hadley hadley added bug an unexpected problem or unintended behavior pivoting ♻️ pivot rectangular data to different "shapes" labels Dec 5, 2019
@hadley hadley added this to the v1.1.0 milestone Dec 5, 2019
@hadley hadley changed the title crossing and nesting no more supports lazy evaluation crossing and nesting no longer supports lazy evaluation Dec 5, 2019
@hadley hadley closed this as completed in f247624 Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior pivoting ♻️ pivot rectangular data to different "shapes"
Projects
None yet
Development

No branches or pull requests

2 participants