Let's consider a dataframe with a column "before" as character format.
How to convert the limits of detection like e.g. "<0.5" to a number with four decimals "0.4999"and the limits of linearity like e.g. ">15.0" to "15.0001" while keeping string texts intact, e.g. "Value > limit"?
Edit
Note that my dataframe contains thousands of lines, including several dozen different detection limits, linearity limits, and string texts; therefore, a global formatting would therefore be preferable, without having to search for and type the different limits/strings one by one in the script to be executed.
dat0 <-
structure(list(before = c("6.1", "<0.5", "4.7", ">15.0", "Value > limit",
"8.0", "Result < cutoff", "6.5", "<50", "92", ">500", "480",
"Value > linearity"), after = c("6.1", "0.4999", "4.7", "15.0001",
"Value > limit", "8.0", "Result < cutoff", "6.5", "49.9999",
"92", "500.0001", "480", "Value > linearity")), class = "data.frame", row.names = c(NA,
-13L))
Thanks for help

It looks like we could use a
case_whenapplied to each column:Result