Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- word sentence
- cat the cat was red
- blue the cat was red
- dog the dogs
- word sentence isInSentence
- cat the cat was red 1
- blue the cat was red 0
- dog the dogs 0
- ifelse(match(d$word, strsplit(d$sentence, ' '), nomatch=0) == 0, 0, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement