Skip to content
Prev 304226 / 398503 Next

String Handling() for Split a word by a letter

Hello,

If the op says he has tried strsplit, maybe a simple subsetting 
afterwards would solve it.

a <- "12345_mydata"
strsplit(a, "_")[[1]][1]

Hope this helps,

Rui Barradas

Em 27-08-2012 15:22, jim holtman escreveu: