Code shows as:
readr::parse_double("123,456,789.987",
locale = locale(decimal_mark = ".",
grouping_mark = ","))
where the expected result is: 123456789.987
But it turns out this throws an error:
1 parsing failure.
row # A tibble: 1 x 4 col row col expected actual
expected <int> <int> <chr> <chr> actual 1 1
NA no trailing characters ,456,789.987
[1] NA
attr(,"problems")
I was wondering why this happened and how to solve it?