I have a column with different names:
X <- c("Ashley, Tremond WILLIAMS, Carla", "Claire, Daron", "Luw, Douglas CANSLER, Stephan")
After the second space, it starts the name of the second person. For instance, Ashley, Tremond is a person and WILLIAMS, Carla another one.
I have tried:
strsplit(X, "\\,\\s|\\,|\\s")
but it divides by all the spaces, so i get:
strsplit(X, "\\,\\s|\\,|\\s")
[[1]]
[1] "Ashley" "Tremond" "WILLIAMS" "Carla"
[[2]]
[1] "Claire" "Daron"
[[3]]
[1] "Luw" "Douglas" "CANSLER" "Stephan"
How can I separate only after the first space, so I get?:
[1] "Ashley, Tremond" "WILLIAMS, Carla"
[[2]]
[1] "Claire, Daron"
[[3]]
[1] "Luw, Douglas" "CANSLER, Stephan"
Thanks in advance for all your help