is.in.01: is.in.01

View source: R/tools.R

is.in.01R Documentation

is.in.01

Description

Tests if a number or vector is in the interval [0,1]

Usage

is.in.01(x, exclude0 = FALSE)

Arguments

x

a number or vector or matrix

exclude0

TRUE is 0 is excluded, FALSE otherwise (default)

Value

a logical of the same size as x

Examples

is.in.01(-5)
is.in.01(0)
is.in.01(1)
is.in.01(0, exclude0 = TRUE)
is.in.01(2.5)
is.in.01(matrix(5:13/10, nrow=3))

landsepi documentation built on July 26, 2023, 5:36 p.m.