Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. word sentence
  2. cat the cat was red
  3. blue the cat was red
  4. dog the dogs
  5.  
  6. word sentence isInSentence
  7. cat the cat was red 1
  8. blue the cat was red 0
  9. dog the dogs 0
  10.  
  11. ifelse(match(d$word, strsplit(d$sentence, ' '), nomatch=0) == 0, 0, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement