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

across2() does not tell mutate() the correct used variables #22

Closed
psychelzh opened this issue Dec 10, 2023 · 1 comment
Closed

across2() does not tell mutate() the correct used variables #22

psychelzh opened this issue Dec 10, 2023 · 1 comment

Comments

@psychelzh
Copy link

See the following example:

dat <- withr::with_seed(
  1,
  data.frame(
    id = 1:5,
    x1 = rnorm(5),
    x2 = rnorm(5)
  )
)
dat |> 
  dplyr::mutate(
    dplyover::across2(
      x1:x2, x1:x2,
      cor
    ),
    .keep = "unused"
  )
#>   x1_x1 x2_x2
#> 1     1     1
#> 2     1     1
#> 3     1     1
#> 4     1     1
#> 5     1     1

Created on 2023-12-10 with reprex v2.0.2

When specifying .keep = "unused", it is expected that id column is kept.

@TimTeaFan
Copy link
Owner

Duplicate of #1

@TimTeaFan TimTeaFan marked this as a duplicate of #1 Dec 10, 2023
@TimTeaFan TimTeaFan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
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

2 participants