Learn R Programming

hqmisc (version 0.2-1)

is.inrange: Check whether argument is within range

Description

Check whether argument x is within range.

Usage

is.inrange( x, range=c(0,1) )

Arguments

x

numerical value(s) to be evaluated.

range

list of two numbers defining the range used in the evaluation of x.

Value

Logical.

Details

The return value indicates whether x is an element of [range[1], range[2]].

Note that the range used in the evaluation includes both endpoints of the specified range.

See Also

range.

Examples

Run this code
# NOT RUN {
is.inrange(1/2)
is.inrange(pi, range=c(0,pi))
# }

Run the code above in your browser using DataLab