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

Error in across #7041

Closed
Unaimend opened this issue Jun 14, 2024 · 2 comments
Closed

Error in across #7041

Unaimend opened this issue Jun 14, 2024 · 2 comments

Comments

@Unaimend
Copy link

data(iris)
iris %>%
  group_by(Species) %>%
  summarise(across(starts_with("Sepal"), ~ mean(.x, na.rm = TRUE)))

Results in following error
Error in across(): ! Must only be used inside data-masking verbs like mutate(), filter(), and group_by(). Run rlang::last_trace()to see where the error occurred. (ins)>

The code was copied from the documentation
https://dplyr.tidyverse.org/reference/across.html#:~:text=across()%20makes%20it%20easy,colwise%22)%20for%20more%20details.

@Unaimend
Copy link
Author

This is definitely an issue with my current environment not with dplyr

@Unaimend
Copy link
Author

The MASS package did mask the select function

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

1 participant