Skip to content

Instantly share code, notes, and snippets.

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 sokarob/0c6c032dea014b5bdf0f250080cb8a43 to your computer and use it in GitHub Desktop.
Save sokarob/0c6c032dea014b5bdf0f250080cb8a43 to your computer and use it in GitHub Desktop.
[Find a String in Another String (Contains)] #find #contains
# Simple Condition
str_detect(`Column`,'STRING')==T
# Condition with case handling
str_detect(toupper(`Column`),'STRING')==T
# Also works for excluding records
str_detect(`Column`,'STRING')==F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment