Learn R Programming

assertive (version 0.1-7)

assert_all_are_finite: Are the inputs (in)finite?

Description

Checks to see if the inputs are (in)finite.

Usage

assert_all_are_finite(x)

  assert_any_are_finite(x)

  assert_all_are_infinite(x)

  assert_any_are_infinite(x)

  is_finite(x)

  is_infinite(x)

Arguments

x
Input to check.

Value

  • is_finite wraps is.finite, showing the names of the inputs in the answer. is_infinite works likewise for is.infinite. The assert_* functions return nothing but throw an error if the corresponding is_* function returns FALSE.

See Also

is.finite

Examples

Run this code
assert_all_are_finite(1:10)
assert_any_are_finite(c(1, Inf))

Run the code above in your browser using DataLab