Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(stringr)
- texts <- c("I doubt it! :)", ";) disagree, but ok.", "No emoticons here!!!")
- smileys <- c(":)","(:",";)",":D")
- str_extract_all(texts, fixed(smileys))
- Warning message:
- In stri_extract_all_fixed(string, pattern, simplify = simplify, :
- longer object length is not a multiple of shorter object length```
- texts %>% map(~ str_extract_all(.x, fixed(smileys)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement