This drops any non-numeric characters before or after the first number. The grouping mark specified by the locale is ignored inside the number.
parse_number(x, na = c("", "NA"), locale = default_locale(), trim_ws = TRUE)
x | Character vector of values to parse. |
---|
Other parsers: parse_factor
,
parse_guess
, parse_logical
parse_number("$1000")#> Error in warn_problems(parse_vector_(x, collector, na = na, locale_ = locale, trim_ws = trim_ws)): could not find function "warn_problems"parse_number("1,234,567.78")#> Error in warn_problems(parse_vector_(x, collector, na = na, locale_ = locale, trim_ws = trim_ws)): could not find function "warn_problems"