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

wrong environment when evaluate expression in dplyr #403

Closed
hs3180 opened this issue Apr 23, 2014 · 0 comments
Closed

wrong environment when evaluate expression in dplyr #403

hs3180 opened this issue Apr 23, 2014 · 0 comments
Assignees

Comments

@hs3180
Copy link
Contributor

@hs3180 hs3180 commented Apr 23, 2014

func1 <- function() {
  func2 <- function(x) floor(x)
  mutate(mtcars, func2(mpg / sum(mpg)))
}
func1()

walks out

could not find function "func2" 

it works good when I remove sum or move the func2 into .GlobalEnv

@hs3180 hs3180 changed the title wrong environment when evaluate expressions that have built-in functions and custom functions in dplyr functions wrong environment when evaluate expression in dplyr Apr 23, 2014
@romainfrancois romainfrancois self-assigned this Apr 24, 2014
@romainfrancois romainfrancois added bug and removed bug labels Apr 24, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
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
2 participants