You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is a mixture of numbers with points or commas for decimal markers, readr::read_delim (I assume this would also be the case for other reading functions) the result is unexpected. When 2.1 is parsed with a decimal marker set to "," I would expect an NA value or an error, but the number 21 or 2 is returned depending on the grouping_mark.
My intuition is that it all boils down to the readr::parse_number function.
readr::parse_number("2.1", locale=readr::locale(decimal_mark=",", grouping_mark="."))
# [1] 21# Expected an NA or error, but not a numberreadr::parse_number("2.1", locale=readr::locale(decimal_mark=",", grouping_mark=""))
# [1] 2# Expected an NA or error, but not a number
When there is a mixture of numbers with points or commas for decimal markers,
readr::read_delim
(I assume this would also be the case for other reading functions) the result is unexpected. When 2.1 is parsed with adecimal marker
set to","
I would expect anNA
value or an error, but the number21
or2
is returned depending on thegrouping_mark
.My intuition is that it all boils down to the
readr::parse_number
function.Thanks a lot!
locale
The text was updated successfully, but these errors were encountered: