is.prob {exams.forge}R Documentation

Interval Checker

Description

Checks if x is in an opened or closed interval between min and max. The default is set as such, that the chosen interval is an interval of (0,1). For example, in the case of x being a probability.

Usage

is.prob(x, open = TRUE, min = 0, max = 1)

is_prob_interval(x, open = TRUE, min = 0, max = 1)

is_prob(x, open = TRUE, min = 0, max = 1)

in_range(x, open = TRUE, min = 0, max = 1)

Arguments

x

numeric: values to check

open

logical: checks if the left and right borders are open or closed (default: TRUE)

min

numeric: minimal value (default: 0)

max

numeric: maximal value (default: 1)

Value

A logical vector with the same length as x.

Examples

is.prob(runif(1))

[Package exams.forge version 1.0.10 Index]