Skip to content

Instantly share code, notes, and snippets.

@cecilialee
Last active March 31, 2018 04:44
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 cecilialee/ee46463ff8f1a272e96ef0e8f33bee81 to your computer and use it in GitHub Desktop.
Save cecilialee/ee46463ff8f1a272e96ef0e8f33bee81 to your computer and use it in GitHub Desktop.
Filter text in any columns in R. #r
library(dplyr)
search <- "color"
iris %>%
filter_all(any_vars(grepl(search, ., ignore.case = TRUE)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment