Learn R Programming

quantspec (version 1.0-0)

is.wholenumber: Checks whether x contains integer numbers.

Description

Borrowed from the example in integer.

Usage

is.wholenumber(x, tol = .Machine$double.eps^0.5)

Arguments

x
a vector to be checked for integers
tol
an optional parameter specifying to which precision the check is to be performed.

Value

  • Returns the time series as a numeric.

Examples

Run this code
is.wholenumber(1) # is TRUE
(x <- seq(1, 5, by = 0.5) )
is.wholenumber( x ) #-->  TRUE FALSE TRUE ...

Run the code above in your browser using DataLab