Learn R Programming

algebraic.dist (version 0.9.1)

has.countable_set: Check membership in a countable set.

Description

Returns TRUE if all values are integers (within floating-point tolerance) that are at least as large as the lower bound.

Usage

# S3 method for countable_set
has(object, x)

Value

Logical; TRUE if all values are valid members of the set.

Arguments

object

A countable_set object.

x

Value(s) to check.

Examples

Run this code
cs <- countable_set$new(0L)
has(cs, c(0, 3, 5))   # TRUE
has(cs, c(-1, 2))     # FALSE (negative integer)
has(cs, 1.5)          # FALSE (not integer)

Run the code above in your browser using DataLab