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

Inconsistent behavior in colwise verbs when quosure is supplied #4330

Closed
echasnovski opened this issue Apr 13, 2019 · 1 comment
Closed

Inconsistent behavior in colwise verbs when quosure is supplied #4330

echasnovski opened this issue Apr 13, 2019 · 1 comment

Comments

@echasnovski
Copy link
Contributor

@echasnovski echasnovski commented Apr 13, 2019

In current dplyr GitHub version (commit 792ca49) there is an inconsistent treatment of quosures in colwise verbs:

suppressPackageStartupMessages(library(dplyr))
library(rlang)

df <- mtcars[1:5, ]

transmute_at(df, vars(mpg), ~ . > mean(.))
#>     mpg
#> 1  TRUE
#> 2  TRUE
#> 3  TRUE
#> 4  TRUE
#> 5 FALSE
# This throws error "Object '.' is not found"
transmute_at(df, vars(mpg), quo(. > mean(.)))
#> Error in ~. > mean(.): объект '.' не найден

summarise_at(df, vars(mpg), ~ mean(.))
#>     mpg
#> 1 20.98
summarise_at(df, vars(mpg), quo(mean(.)))
#>     mpg
#> 1 20.98

Created on 2019-04-13 by the reprex package (v0.2.1)

And could you please tell me: by current design, should I be able to pass quosures in .funs? In docs it says that .funs can be "...a quosure style lambda ~ fun(.)...".

@lock
Copy link

@lock lock bot commented Nov 24, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant