I am trying to remove a portion of a string. The best I can come up with is to strsplit and then concatenate (maybe there is an easier way.
list<-as.character(c("joe_joe_ID1000", "bob_bob_ID20000"))
list<-strsplit(list, "_")
I would like my output to be "joe joe" and "bob bob" but I am unclear on how to concatenate the resulting strsplit list. And perhaps there is an even easier way Thanks.