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
Leading zeroes #266
Comments
Seems reasonable to me. Reprex: collectorGuess("00001", default_locale()) |
Hmmm, this is easy enough to do for integers, but what's the rule for doubles? Should |
I think if it just worked for integers that would still be really nice. All my real-life examples are unambiguously integer (last x digits of student IDs, player numbers such as |
You have to think about doubles because |
This is what I have so far collector_guess("0")
#> [1] "integer"
collector_guess("0.")
#> [1] "double"
collector_guess("0001")
#> [1] "character" |
I wonder if leading zeroes should cause a column to come in as character? I know I can force the variable to be character and will do so in my current example.
But I suspect that numbers with leading zeroes should be treated as character more often than not. Examples: social security numbers, zip codes, phone numbers with country exit codes, numbers written written for alphalexical sorting, and agent identifiers in the 00 Section of MI6.
The text was updated successfully, but these errors were encountered: