Skip to content

Instantly share code, notes, and snippets.

@aqd14
Created April 19, 2019 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aqd14/061b947ca3cbd1f70bc86bf9dd9817fe to your computer and use it in GitHub Desktop.
Save aqd14/061b947ca3cbd1f70bc86bf9dd9817fe to your computer and use it in GitHub Desktop.
college_data_processed <- college_data_processed %>%
group_by(STATENAME) %>%
mutate_at(vars(-UNITID:-REGION, -INSTNM), ~ifelse(is.na(.x), mean(.x, na.rm = TRUE), .x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment