R: Test if scalar is in intervall

is.scalar_in {rccmisc} | R Documentation

## Test if scalar is in intervall

### Description

Test if scalar is in intervall

### Usage

    is.scalar_in(left, right)

    is.scalar_in01(x)

### Arguments

`left, right` | arguments passed to `between`
`x` | R object to be tested, most likely a numeric vector of length one (other formats are allowed but will always return `FALSE`).

### Value

`is.scalar_in01` returns `TRUE` if `x` is an atomic vector of length one and `0 <= as_numeric(x) <= 1`. `is.scalar_in` return a function similair to `is.scalar_in01` but with specified boundaries.

### Examples

    is.scalar_in01(.5) # TRUE
    is.scalar_in01(5) # FALSE
    is.scalar_in01(seq(0,1,.1)) # FALSE

    is_scalar_in09 <- is.scalar_in(0,9)
    is_scalar_in09(5) # TRUE

[Package rccmisc version 0.3.7 Index]