Search notes:

R function: is.integer

is.integer() tests if an object is of type integer. The returned value is particularly interesting for numerical literals like 42. They seem to be integers when in fact they're doubles. (However, if they were suffixed by an L, they'd be integers).
doubles      <- c(1.1 , 2.2 , 3.3, 4.4 );
doubles_too  <- c(1   , 2   , 3  , 4   );
integers     <- c(1L  , 2L  , 3L , 4L  );
hmmmm        <- c(1L  , 2L  , 3L , 4   );

is.integer(doubles    );
#
#  FALSE

is.integer(doubles_too);
#
#  FALSE

is.integer(integers   );
#
#  TRUE

is.integer(hmmmm      );
#
#  FALSE
Github repository about-r, path: /functions/is/integer/doubles-vs-integers.R

See also

Index to (some) R functions

Index