integer(length = 0) as.integer(x) is.integer(x)
0
.
Integer vectors exist so that data can be passed to C or Fortran code
which expects them.
as.integer
attempts to coerce its argument to be of integer
type.
is.integer
returns TRUE
or FALSE
depending on
whether its argument is of integer type or not.