R - Conditional Substr from dataframe -


i need substr column based on start , end locations. start , end locations derived character search.

for example, single column in dataframe 3 rows:

'bond, mr. :james' 'woman, mrs. :wonder' 'hood, mr. :robin' 

expected answer in column 2 is:

'mr.' 'mrs.' 'mr.' 

i want extract strings in between ',' , ':' column 1.

try gsub(".*, | :.*", "", myvec)


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -