A double: a finite number within the bounds. infinite = TRUE admits the
infinities that the bounds do not exclude, so that
type_double(min = 0, infinite = TRUE) is [0, Inf]. nan = TRUE admits NaN,
the result of a calculation that is undefined, which is in no range:
type_double(min = 0, max = 1, nan = TRUE) is [0, 1] or NaN. A missing value,
NA, is admitted by option(), as of every type.
Usage
type_double(
min = NULL,
max = NULL,
exclusive_min = NULL,
exclusive_max = NULL,
infinite = FALSE,
nan = FALSE,
values = NULL
)Arguments
- min
Optional Numeric: Smallest admitted value.
- max
Optional Numeric: Largest admitted value.
- exclusive_min
Optional Numeric: The value must be above it. Given with
min, it raisesr8_declaration_error.- exclusive_max
Optional Numeric: The value must be below it. Given with
max, it raisesr8_declaration_error.- infinite
Logical: If TRUE, admit
Infand-Infwithin the bounds.- nan
Logical: If TRUE, admit
NaN, whatever the bounds andvaluesare.- values
Optional Numeric: The admitted values.