I have a string
rule <- "X[,16] <= -0.664 & X[,11] <= -2.1891 & X[,17] >= -0.4138"
I want to split a string into two parts
num_part = c(16 , -0.664 , 11 , -2.1891 , 17 , -0.4138)
char_part = c("X[,]<= & X[,] <= & X[,] >=")
I found a similar question but I couldn't apply any of the eight examples to my data