-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove quoted_na arg and solve other bugs due to major release of readr #27
Conversation
This is needed as the argument is now deprecated
A classic copy paste typo. WIth crlf instead of cr this test works fine.
Odd that |
@damianooldoni I assumed you removed this, but it has nothing to do with quoted_na I think
After a detailed debugging I finally found the reason why R hangs for tests with numbers, e.g. test of resources at lines 218-249. |
Yes, I debugged it like that as well. 😊 Good that it will be fixed at readr. We could also always pass “.” I’ll finish this PR. One last question: is quoted_na effectively deprecated? |
About the problems with numbers, I think that passing "." to the grouping mark could create problems as it is also used as decimal mark, isn't? About the bug in readr which has been solved at dev level, notice that this has NOT been solved in readr itself but in the dev version of one of its dependencies, |
Indeed, we could pass
I therefore wonder if we couldn't set grouping mark by default to a special character that is unlikely to be used in non-bare-numbers? |
I just gave a try and I found that:
library(readr)
local_damianoo <- locale(decimal_mark = ",",
grouping_mark = ",")
#> Error: `decimal_mark` and `grouping_mark` must be different
local_damianoo <- locale(decimal_mark = ".")
cat(paste0("Decimal mark: \"", local_damianoo$decimal_mark,
"\"\nGrouping mark: \"", local_damianoo$grouping_mark, "\""))
#> Decimal mark: "."
#> Grouping mark: ","
local_damianoo <- locale(decimal_mark = ",")
cat(paste0("Decimal mark: \"", local_damianoo$decimal_mark,
"\"\nGrouping mark: \"", local_damianoo$grouping_mark, "\""))
#> Decimal mark: ","
#> Grouping mark: "."
local_damianoo <- locale(grouping_mark = ".")
cat(paste0("Decimal mark: \"", local_damianoo$decimal_mark,
"\"\nGrouping mark: \"", local_damianoo$grouping_mark, "\""))
#> Decimal mark: ","
#> Grouping mark: "."
local_damianoo <- locale(grouping_mark = ",")
cat(paste0("Decimal mark: \"", local_damianoo$decimal_mark,
"\"\nGrouping mark: \"", local_damianoo$grouping_mark, "\""))
#> Decimal mark: "."
#> Grouping mark: "," |
Test that default group char does not conflict with decimal char
Codecov Report
@@ Coverage Diff @@
## main #27 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 186 185 -1
=========================================
- Hits 186 185 -1
Continue to review full report at Codecov.
|
This PR would like to update the package as some bugs have been detected due to a major release (2.x) of readr package.
Also a warning due to the use of the deprecated arg
quoted_na
.This PR has still not to be reviewed. I wrote it now so to have automatic tests running on different OS via GitHub actions.