This is what you want to be doing (check out output of str_locate
to see why it wasn't working for you, also note that str_sub
recycles the arguments):
d1$y = str_sub(d1$x, str_locate(d1$x, fixed("_"))[,1] + 1, -1)
Or in base R:
d1$y = sub("^[^_]*_", "", d1$x)