Learn R Programming

popEpi (version 0.2.1)

try2int: Attempts to convert a numeric object to integer, but won't if loss of information is imminent

Description

Attempts to convert a numeric object to integer, but won't if loss of information is imminent

Usage

try2int(obj)

Arguments

obj
a numeric vector

source

http://stackoverflow.com/questions/3476782/how-to-check-if-the-number-is-integer{Stackoverflow thread}