I have a guest list that has a last name in one column and then in another column I have the first names or the full names (first space last) of each person in the family. I am wanting to get the other column to just have the first names.
gsub(guest.w$Last.Name,"",guest.w$Party.Name.s.)
That would work perfectly if I just had one row but how do it do it for each row in the dataframe. Do I have to write a for loop? Is there a way to do it in parallel similarly to the way pmax() relates to max().
My problem is similar in a way to a previously asked question by JD Long but that question was a piece of cake compared to mine.
Example
:
Smith; Joe Smith, Kevin Smith, Jane Smith
Alter; Robert Alter, Mary Alter, Ronald Alter
Becomes
Smith; Joe, Kevin, Jane
Alter; Robert, Mary, Ronald