Learn R Programming

smallstuff (version 1.0.3)

isInt: Determine if the Input contains Integers

Description

Determine if numbers in a vector are integers (not just of integer type)

Usage

isInt(x, inf = TRUE)

Value

TRUE for each value in x that is an integer, FALSE otherwise

Arguments

x

integer or numeric type vector

inf

logical field answering whether an infinite value should be considered an integer (default TRUE)

Examples

Run this code
isInt(c(3,3.23,Inf))

Run the code above in your browser using DataLab