I would like to remove everything after a space in a string.
For example:
\"my string is sad\"
should return
\"m
or, substitute everything behind the first space to nothing:
gsub(' [A-z ]*', '' , 'my string is sad')
And with numbers:
gsub('([0-9]+) .*', '\\1', c('c123123123 0320.1'))