Learn R Programming

distr6 (version 1.3.2)

liesInSetInterval: Test if Data Lies in SetInterval.

Description

Tests if the given data lies in the SetInterval, either tests if all data lies in the type or any of it, can choose if bounds should be included.

Arguments

x

vector of numerics to test.

all

logical, see details.

bound

logical, if FALSE (default) tests against dmin/dmax otherwise inf/sup.

Value

Either a vector of logicals if all is FALSE otherwise returns TRUE if every element lies in the SetInterval or FALSE otherwise.

R6 Usage

$liesInSetInterval(x, all = FALSE, bound = FALSE)

Details

If all is TRUE (default) returns TRUE only if every element in x lies in the type. If all is FALSE then returns a vector of logicals for each corresponding element in the vector x.

If called on a set, then the bound argument is ignored and returns TRUE if x is an element in the set.

This is an R6 method only, no S3 dispatch is available.

See Also

SetInterval