Learn R Programming

ufs (version 0.5.12)

is.nr: NULL and NA 'proof' checking of whether something is a number

Description

Convenience function that returns TRUE if the argument is not null, not NA, and is.numeric.

Usage

is.nr(x)

Value

TRUE or FALSE.

Arguments

x

The value or vector to check.

Examples

Run this code
is.nr(8);    ### Returns TRUE
is.nr(NULL); ### Returns FALSE
is.nr(NA);   ### Returns FALSE

Run the code above in your browser using DataLab