Type constraints that use numeric fail for integers
Closed this issue · 1 comments
muxspace commented
The reason Is that an integer does not inherit from numeric in S3.
> class(as.integer(4))
[1] "integer"
> is.integer(as.integer(4))
[1] TRUE
> is.numeric(as.integer(4))
[1] TRUE
Instead what is needed is to convert a numeric
reference to is.numeric()
, the same way that Function
maps to is.function()
.
muxspace commented
Fixed in 1.1.4