Skip to content

Updated method of replacing all NAs in numeric columns #1

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

grantengel-septa
Copy link

With most current version of dplyr, replacing NAs with 0 using "mutate_all" applies to character columns as well, which throws a data type error. Replacing with "mutate" + new verbs "across" & "where" to replace NAs only in those columns that are numeric data type. According to dplyr documentation, "mutate" + "across" supersedes "mutate_all".

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

Successfully merging this pull request may close these issues.

1 participant