I have the following string :
G="[-2.798,-1.805)"
I need only the numeric vector [1] -2.798 -1.805
so I try
as.numeric(unique(unlist(regmatches(G, gregexpr("[0-9]+", G)))))
get: [1] 2 798 1 805
but, I don't know what else I could do.
Thanks so much