I have a csv file which contains data in the following format:
PrjID, Objective
1001 , (i) To improve efficiency (ii) Decrease cost (iii) Maximize revenue
1002 , a) Have fun b) Learn new things
1003 , (1) Getting tricky (2) Challanging task
First variable is an Id and the second variable is a text variable "objective". Each project has data on multiple objectives in a single column seperate by (i), (ii), ..etc or (a), (b), (c),..etc, or (1), (2), (3), ..etc. Now I want an observation created for each objective of the projects. Much like this:
PrjID, Objective
1001 , (i) To improve efficiency
1001 , (ii) Decrease cost
1001 , (iii) Maximize revenue
1002 , a) Have fun
1002 , b) Learn new things
1003 , (1) Getting tricky
1003 , (2) Challanging task
For the projects that have just one objective, it has just one row. But for multiple objectives it splits up the observation.
I am quite new to handling text data in R, can some R pro help me get started with this problem? Thanks in advance!