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