I have strings like "<x" which must be changed to "x".
for example:
"<0.1" will be "0.1"
I tried this:
data2[1:nrow(data2),] <- as.data.frame(apply(data2[1:nrow(data2),], 2, function(x) sub("<a*", "", x)))
But it also changes strings like "wrong (<0.1)" to "wrong (0.1)". It has to only change the values like "<x" to "x".
I searched for examples like: String replace specific part of string Replace $x<y$ by $x < y$
But they unfortunately did not help.