Last active
April 7, 2017 05:26
-
-
Save MattSandy/35a563405d3375bc71e092568abec8af to your computer and use it in GitHub Desktop.
Returns the vector of each word found before the end of a sentence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
termination_words <- toupper(as.character(sapply(unlist(strsplit(text,'\\.')),function(x) { | |
words <- unlist(strsplit(x,' ')) | |
return(words[length(words)]) | |
}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment