I have a column containning different names, I would like to get all the strings after the second space of characters.
My example.
df <- data.frame(col = c("Adenia macrophylla", "Adinobotrys atropurpureus (Wall.) Dunn", "Ardisia purpurea Reinw. ex Blume"))
My desired outcome like this
col
1
2 (Wall.) Dunn
3 Reinw. ex Blume
Any sugesstions for me? The way before I did is to separate them and unite, but I consider whether we have any fancy way or better to do it, since I already have many columns.
Update Just solve it
xx %>%
mutate(col = str_pad(col, 20,"right")) %>%
mutate(col = str_remove(col, '\\w+\\s\\w+\\s'))
Thanks @Ronak and @U12-Forward for providing me regex