rlang icon indicating copy to clipboard operation
rlang copied to clipboard

Add vector methods for numbers in `standalone-types-check.R` (Fixes #1714)

Open khusmann opened this issue 3 months ago • 0 comments

In this PR:

  • Updated Changelog
  • Renamed check_number_decimal() to check_number() (at @lionel- 's suggestion)
  • Added check_numeric() and check_numeric_whole(), vectorized versions of check_number() and check_number_whole()
  • Added unit tests

Notes: The allow_na and allow_null logic is getting pretty repetitive (and error handling is not standardized). Let me know if you'd like me to submit another PR to abstract this across the check_*() functions. It's not trivial because of the differences across types, but I think I see a nice way to go about this.

khusmann avatar Sep 19 '25 19:09 khusmann