I was trying to use the vctrs package and I come up with the following error message:
library(vctrs)
vec_assert(1L, numeric())
#> Error: `1L` must be a vector with type <double>.
#> Instead, it has type <integer>.
I am pretty sure that numeric can be either double or integer, then I did a little bit of digging:
class(1L) == class(integer())
#> [1] TRUE
class(1L) == class(numeric())
#> [1] FALSE
is.numeric(1L)
#> [1] TRUE
Is numeric() broken, or is it something that I don't understand?