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 auto names #1221

Closed
romainfrancois opened this issue Nov 15, 2021 · 3 comments · Fixed by #1230
Closed

crossing() and auto names #1221

romainfrancois opened this issue Nov 15, 2021 · 3 comments · Fixed by #1230
Labels
bug an unexpected problem or unintended behavior grids #️⃣ expanding, nesting, crossing, ...

Comments

@romainfrancois
Copy link
Member

library(tidyr)
library(dplyr, warn.conflicts = FALSE)

list_with_some_very_long_name <- list(
  data = tibble(x = 1, y = 2, z = 3, a = 4)
)

crossing(
  list_with_some_very_long_name$data %>% select(.data$x, .data$y), 
  list_with_some_very_long_name$data %>% select(.data$z, .data$a)
)
#> Error: Column name `list_with_some_very_long_name$data %>% ...` must not be duplicated.
#> Use .name_repair to specify repair.

tidyr:::dots_cols(
  list_with_some_very_long_name$data %>% select(.data$x, .data$y), 
  list_with_some_very_long_name$data %>% select(.data$z, .data$a)
)
#> $`list_with_some_very_long_name$data %>% ...`
#> # A tibble: 1 × 2
#>       z     a
#>   <dbl> <dbl>
#> 1     3     4
#> 
#> $`list_with_some_very_long_name$data %>% ...`
#> # A tibble: 1 × 2
#>       z     a
#>   <dbl> <dbl>
#> 1     3     4
#> 
#> attr(,"named")
#> [1] FALSE FALSE

Created on 2021-11-15 by the reprex package (v2.0.1.9000)

Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.0.3 (2020-10-10)
#>  os       macOS Big Sur 10.16         
#>  system   x86_64, darwin17.0          
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       Europe/Paris                
#>  date     2021-11-15                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version     date       lib source                           
#>  assertthat    0.2.1       2019-03-21 [1] CRAN (R 4.0.0)                   
#>  backports     1.3.0       2021-10-27 [1] standard (@1.3.0)                
#>  cli           3.1.0       2021-10-27 [1] CRAN (R 4.0.2)                   
#>  crayon        1.4.2       2021-10-29 [1] CRAN (R 4.0.2)                   
#>  DBI           1.1.1       2021-01-15 [1] CRAN (R 4.0.2)                   
#>  digest        0.6.28      2021-09-23 [1] standard (@0.6.28)               
#>  dplyr       * 1.0.7.9000  2021-11-15 [1] local                            
#>  ellipsis      0.3.2       2021-04-29 [1] CRAN (R 4.0.3)                   
#>  evaluate      0.14        2019-05-28 [1] CRAN (R 4.0.0)                   
#>  fansi         0.5.0       2021-05-25 [1] standard (@0.5.0)                
#>  fastmap       1.1.0       2021-01-25 [1] CRAN (R 4.0.2)                   
#>  fs            1.5.0       2020-07-31 [1] CRAN (R 4.0.2)                   
#>  generics      0.1.1       2021-10-25 [1] CRAN (R 4.0.2)                   
#>  glue          1.5.0       2021-11-07 [1] CRAN (R 4.0.2)                   
#>  highr         0.9         2021-04-16 [1] CRAN (R 4.0.2)                   
#>  htmltools     0.5.2       2021-08-25 [1] standard (@0.5.2)                
#>  knitr         1.36        2021-09-29 [1] standard (@1.36)                 
#>  lifecycle     1.0.1       2021-09-24 [1] standard (@1.0.1)                
#>  magrittr      2.0.1       2020-11-17 [1] CRAN (R 4.0.2)                   
#>  pillar        1.6.4       2021-10-18 [1] standard (@1.6.4)                
#>  pkgconfig     2.0.3       2019-09-22 [1] CRAN (R 4.0.0)                   
#>  purrr         0.3.4       2020-04-17 [1] CRAN (R 4.0.0)                   
#>  R.cache       0.15.0      2021-04-30 [1] CRAN (R 4.0.2)                   
#>  R.methodsS3   1.8.1       2020-08-26 [1] CRAN (R 4.0.2)                   
#>  R.oo          1.24.0      2020-08-26 [1] CRAN (R 4.0.2)                   
#>  R.utils       2.11.0      2021-09-26 [1] standard (@2.11.0)               
#>  R6            2.5.1       2021-08-19 [1] CRAN (R 4.0.2)                   
#>  reprex        2.0.1.9000  2021-10-01 [1] Github (tidyverse/reprex@9ca939f)
#>  rlang         0.99.0.9000 2021-11-15 [1] Github (r-lib/rlang@ae7050d)     
#>  rmarkdown     2.11        2021-09-14 [1] standard (@2.11)                 
#>  rstudioapi    0.13        2020-11-12 [1] CRAN (R 4.0.2)                   
#>  sessioninfo   1.1.1       2018-11-05 [1] CRAN (R 4.0.0)                   
#>  stringi       1.7.5       2021-10-04 [1] standard (@1.7.5)                
#>  stringr       1.4.0       2019-02-10 [1] CRAN (R 4.0.2)                   
#>  styler        1.6.2       2021-09-23 [1] standard (@1.6.2)                
#>  tibble        3.1.6       2021-11-07 [1] standard (@3.1.6)                
#>  tidyr       * 1.1.4.9000  2021-11-15 [1] Github (tidyverse/tidyr@7dfe606) 
#>  tidyselect    1.1.1       2021-04-30 [1] standard (@1.1.1)                
#>  utf8          1.2.2       2021-07-24 [1] CRAN (R 4.0.2)                   
#>  vctrs         0.3.8       2021-04-29 [1] standard (@0.3.8)                
#>  withr         2.4.2       2021-04-18 [1] CRAN (R 4.0.2)                   
#>  xfun          0.28        2021-11-04 [1] standard (@0.28)                 
#>  yaml          2.2.1       2020-02-01 [1] CRAN (R 4.0.0)                   
#> 
#> [1] /Users/romainfrancois/.R/library/4.0
#> [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library
@romainfrancois
Copy link
Member Author

This is the root issue that makes package dynplot fail reverse dependency against dplyr 1.0.8.

@romainfrancois romainfrancois changed the title tidy::crossing() and auto names crossing() and auto names Nov 15, 2021
@DavisVaughan
Copy link
Member

Likely somehow related to #1037 but ill keep this open to make sure I add a test

@DavisVaughan DavisVaughan added bug an unexpected problem or unintended behavior grids #️⃣ expanding, nesting, crossing, ... labels Nov 15, 2021
@DavisVaughan
Copy link
Member

@romainfrancois just wanted to note that I'm not sure why this came up in a dplyr revdep. This has been an issue in the CRAN version of tidyr for a little while

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 grids #️⃣ expanding, nesting, crossing, ...
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants