From dusa.adrian at unibuc.ro  Thu Dec 17 16:02:00 2015
From: dusa.adrian at unibuc.ro (=?UTF-8?B?QWRyaWFuIER1yJlh?=)
Date: Thu, 17 Dec 2015 17:02:00 +0200
Subject: [Rd] integer
Message-ID: <CAJ=0CtDxVZzpNbE2ZvBK3Ki2TCuO929Hi_MvLwRH2aOGU7OxTQ@mail.gmail.com>

In the help page for ?is.integer, there is this function

is.wholenumber <-
    function(x, tol = .Machine$double.eps^0.5)  abs(x - round(x)) < tol

A quick question: is there a case where this alternative function will not
work?
    function(x) x %% 1 == 0

Best,
Adrian

-- 
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr.90
050663 Bucharest sector 5
Romania

	[[alternative HTML version deleted]]



[Rd] integer
=?UTF-8?B?QWRyaWFuIER1yJlh?=