Learn R Programming

schoolmath (version 0.4.2)

is.whole: check whether a vector contains numbers with decimal places

Description

check whether a vector contains numbers with decimal places

Usage

is.whole(x)

Value

true or false

Arguments

x

the number or vector to check #'

Examples

Run this code
is.whole(3.12)  # this will return FALSE
is.whole(2)     # this will return TRUE

x <- c(1, 2, 3, 4, 5.5, 6.03, 23.07)
is.whole(x)

Run the code above in your browser using DataLab