Skip to content
Prev 298865 / 398506 Next

Decrete value check in a matrix

You are not asking for a Decrete [sic]  (descrete) value check but rather if the numbers are intergers.  

Try this:

# from the ?is.integer help page
is.wholenumber <-
    function(x, tol = .Machine$double.eps^0.5)  abs(x - round(x)) < tol


aa  <- data.frame( na = c( 1, 3.4, 5, 5.6), nb = c(2.4, 4, 6, 6.7))
ww  <- data.frame(  is.wholenumber(aa))
cbind(aa, ww)

John Kane
Kingston ON Canada
____________________________________________________________
Receive Notifications of Incoming Messages
Easily monitor multiple email accounts & access them with a click.
Visit http://www.inbox.com/notifier and check it out!