is.within | R Documentation |
is.within
tests if object x
is within interval
.
is.within(x, interval, open.interval = FALSE)
x |
A numeric x, vector or list. |
interval |
The (numeric) interval within which |
open.interval |
logical: should |
This function tests if the given value is contained within a (possibly open) given interval.
The default method for is.within
applied to an atomic vector returns
a logical vector of the same length as its argument x, containing TRUE for those elements contained within interval
, and FALSE otherwise.
Felipe Figueiredo
is.within(1.5, c(0,5)) # TRUE is.within(6, c(0,5)) # FALSE is.within(c(1.5, 6), c(0,5)) # vector: TRUE, TRUE is.within(list(1.5, 6), c(0,5)) # list: TRUE, FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.