Learn R Programming

algebraic.dist (version 0.9.1)

has.interval: Determine if a value is contained in the interval.

Description

Determine if a value is contained in the interval.

Usage

# S3 method for interval
has(object, x)

Value

Logical vector indicating containment.

Arguments

object

An interval object.

x

A vector of values.

Examples

Run this code
iv <- interval$new(lower = 0, upper = 1)
has(iv, 0.5) # TRUE
has(iv, 2.0) # FALSE

Run the code above in your browser using DataLab