What\'s the most elegant way to extract the last word in a sentence string?
The sentence does not end with a \".\" Words are seperated by blanks.
sen
Just for completeness: The library stringr contains a function for exactly this problem.
library(stringr) sentence <- "The quick brown fox" word(sentence,-1) [1] "fox"