Skip to content

Instantly share code, notes, and snippets.

@samarthbhaskar
Created October 21, 2014 19:02
Show Gist options
  • Save samarthbhaskar/b54ec7f597c24588e4ab to your computer and use it in GitHub Desktop.
Save samarthbhaskar/b54ec7f597c24588e4ab to your computer and use it in GitHub Desktop.
Why?
library(stringr)
a <- c("Windows NT", "Windows NT 4.0", "L4", "Nokia OS", "Linux - Fedora", "Windows 2000","LG proprietary","Linux - Debian", "Windows 8")
b <- ifelse(str_detect(a, "Window"), "Window", a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment