Learn R Programming

ISOpureR (version 1.1.3)

ISOpure.util.matlab_less_than: Less than operator

Description

Less than function that matches Matlab behaviour when one of the arguments is NA (i.e. returns FALSE instead of NA)

Usage

ISOpure.util.matlab_less_than(a, b)

Arguments

a

A numeric value (including Inf) or NA

b

A numeric value (including Inf) or NA

Value

Logical: TRUE if a < b, FALSE if a >= b OR if one of a, b is NA or NaN

Examples

Run this code
# NOT RUN {
ISOpure.util.matlab_less_than(5,3)
#[1] FALSE
ISOpure.util.matlab_less_than(3,5)
#[1] TRUE
ISOpure.util.matlab_less_than(5,NA)
#[1] FALSE
ISOpure.util.matlab_less_than(NA,5)
#[1] FALSE
ISOpure.util.matlab_less_than(5,Inf)
#[1] TRUE
ISOpure.util.matlab_less_than(Inf,5)
#[1] FALSE
# }

Run the code above in your browser using DataLab