How would you extract all characters up to a specified character? For Example given, I would like to extract everything before the "." (period):
a<-c("asdasd.sss","segssddfge.sss","se.sss")
I would like to get back:
asdasd segssddfge se
I tried:
substr(a,1,".")
but it doesn't seem to work.
any ideas?
See Question&Answers more detail:os