I wish this helpful for you I have a string field that mostly contains numeric decimal values, but sometimes contains values like "<0.10" or "HEMOLYSIS". , In the past, I've created a SQL Expression that returns a NULL:
To fix the issue you can do It looks like you have a named vector, where, e.g., the name "m/z = 899.91" has the value 0.6186..., the name "m/z = 900.36" has the value 1.35811..., etc. Your vector is numeric, and the values are all those less-than-one parts. The 899.91, 900.36, etc. are part of the names. So as.numeric(gsub("m/z = ", "", names(data))) should get you the numeric part of the names.