I am having a dataframe that is having columns of names and surnames. I need to eliminate all the first names.
Sociologist Referencia
1 Peter Abell Peter Abell
2 Mark Abrams Mark Abrams
3 Janet Abu-Lughod Janet Abu-Lughod
4 Jane Addams Jane Addams
5 Theodor W. Adorno Theodor W. Adorno
6 Richard Alba Richard Alba
I tried with a code taken from a similar question, but it eliminates the surnames, not the first names, which is what i need. Below is the code that I have implemented:
Sociologos_df$word<- sub("([A-Za-z]+).*", "\1", Sociologos_df$word)