Skip to content
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

If *isic* is numeric we should throw a warning or error #102

Open
maurolepore opened this issue Dec 6, 2023 · 0 comments
Open

If *isic* is numeric we should throw a warning or error #102

maurolepore opened this issue Dec 6, 2023 · 0 comments
Assignees

Comments

@maurolepore
Copy link
Contributor

Relates to https://github.com/2DegreesInvesting/tiltIndicatorBefore/pull/69
Relates to 2DegreesInvesting/tiltIndicator#636

Now we expect single quotes around values of *isic*. This should nudge all reading functions to interpret *isic* as a character and protect leading zeroes.

If the user passes a dataset where *isic* is numeric, then we should throw a warning like this:

rlang::warn(c(
  "`*isic_4digit` should be a character but it's numeric.",
  i = "Are you using outdated data?"
))
#> Warning: `*isic_4digit` should be a character but it's numeric.
#> ℹ Are you using outdated data?

Created on 2023-12-06 with reprex v2.0.2

@maurolepore maurolepore self-assigned this Dec 6, 2023
@maurolepore maurolepore changed the title If *isic* is numeric we should throw a warning If *isic* is numeric we should throw a warning or error Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant