is.in.01 | R Documentation |
Tests if a number or vector is in the interval [0,1]
is.in.01(x, exclude0 = FALSE)
x |
a number or vector or matrix |
exclude0 |
TRUE is 0 is excluded, FALSE otherwise (default) |
a logical of the same size as x
is.in.01(-5) is.in.01(0) is.in.01(1) is.in.01(0, exclude0 = TRUE) is.in.01(2.5) is.in.01(matrix(5:13/10, nrow=3))