Say I have a string for example the following.
x <- 'The world is at end. What do you think? I am going crazy! These people are too calm.'
I need to split only on the punctuation !?.
and following whitespace and keep the punctuation with it.
This removes the punctuation and leaves leading spaces in the split parts though
vec <- strsplit(x, '[!?.][:space:]*')
How can I split sentences leaving the punctuation?