rlang
rlang copied to clipboard
Add vector methods for numbers in `standalone-types-check.R` (Fixes #1714)
In this PR:
- Updated Changelog
- Renamed
check_number_decimal()tocheck_number()(at @lionel- 's suggestion) - Added
check_numeric()andcheck_numeric_whole(), vectorized versions ofcheck_number()andcheck_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.