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

mutate_if unexpected result when no columns match criteria #2009

Closed
derekholmes opened this issue Jul 10, 2016 · 2 comments
Closed

mutate_if unexpected result when no columns match criteria #2009

derekholmes opened this issue Jul 10, 2016 · 2 comments

Comments

@derekholmes
Copy link

@derekholmes derekholmes commented Jul 10, 2016

mutate_if seems to apply an operation to all columns if none qualify:
> data_frame(a=1:2,b=3:4) %>% mutate_if(is.factor,as.character) %>% str
'data.frame': 2 obs. of 2 variables:
$ a: chr "1" "2"
$ b: chr "3" "4"

am I missing something?

@hadley
Copy link
Member

@hadley hadley commented Jul 10, 2016

@lionel- can you please take a look when you have a minute?

@derekholmes
Copy link
Author

@derekholmes derekholmes commented Jul 10, 2016

My apologies, I just realized this was the same issue as #1989

@hadley hadley closed this Jul 11, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 8, 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