Hello I have a df such as
COL1
SEQ_1.1_0
SEQ2.2_2
AB_1_2.3_3
ACC.3_3
and I would like to strsplit it by the last "number_"
and get :
COL1 COL2
SEQ_1.1 0
SEQ2.2 2
AB_1_2.3 3
ACC.3 3
so far I tried:
strsplit(df$COL1, "*.[0-9]_")
here is the code I use and need to use
df$shorti = do.call(rbind, strsplit(as.character(df$COL1), "*.[0-9]_"))[,1]