I am new in this group (and also a quite-new R user) and I have a question. I have a data.table like this
Date V2 Deal Type
-----------------
1: 2009-1 Public sector bank Corporate Bond-Investment-Grade
2: 2009-1 Private sector bank Corporate Bond-Investment-Grade
3: 2009-7 Private sector industrial Corporate Bond-Investment-Grade
4: 2009-1 Private sector bank Corporate Bond-Investment-Grade
5: 2009-1 Private sector bank Covered Bond
6: 2009-1 Public sector bank Corporate Bond-Investment-Grade
7: 2009-1 Private sector bank Corporate Bond-Investment-Grade
The question is how do I change the names of variables (and variables) in column V2. For example i want that "public sector bank" and "private sector bank" would appear in a new column as "financial" and "private sector industrial" and "public sector industrial" as "non-financial". Hope I have been sufficiently clear. Thank you very much for your help.