Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion R/standalone-types-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# ---
#
# ## Changelog
# 2024-06-28:
# - Improved error messages of number checkers (@olivroy)
#
# 2023-03-13:
# - Improved error messages of number checkers (@teunbrand)
Expand Down Expand Up @@ -258,7 +260,11 @@ check_number_whole <- function(x,
max <- max %||% Inf

if (min > -Inf && max < Inf) {
what <- sprintf("%s between %s and %s", what, min, max)
if (min == max) {
what <- sprintf("%s equal to %s", what, min)
} else {
what <- sprintf("%s between %s and %s", what, min, max)
}
} else if (x < min) {
what <- sprintf("%s larger than or equal to %s", what, min)
} else if (x > max) {
Expand Down