Skip to contents

Checks whether the given input is a scalar integer or not.

Usage

is.int(x)

Arguments

x

An object that we want to know if it is an integer.

Value

A boolean, TRUE or FALSE.

Details

If x is a scalarinteger, is.int(x) returns TRUE, else, returns FALSE.

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
# basic example
A <- 3
B <- 3.4
C <- rep(3, 10)

is.int(A)  # returns TRUE
is.int(B)  # returns FALSE
is.int(C)  # returns FALSE
}