R/destring.R
destring.Rd
Convert character vector to numeric, ignoring irrelevant characters.
destring(x, keep = "0-9.-")
A vector to be operated on
Characters to keep in, in bracket regular expression form. Typically includes 0-9 as well as the decimal separator (. in the US and , in Europe).
vector of type numeric
destring("24k")
#> [1] 24
destring("5,5")
#> [1] 55