[Rd] integer

Adrian Dușa dusa.adrian at unibuc.ro
Thu Dec 17 16:02:00 CET 2015


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]]



More information about the R-devel mailing list