check.nonnegative: Check function: nonnegative number

View source: R/checks.R

check.nonnegativeR Documentation

Check function: nonnegative number

Description

This function checks whether variable satisfies the following requirements:

  • The class of the variable is numeric.

  • The length of the variable is 1.

  • The variable is nonnegative.

If not, an error message is displayed.

Usage

check.nonnegative(x, name.var)

Arguments

x

The variable to be checked.

name.var

The name of the variable.

Value

Nothing is returned.


conroylau/lpinfer documentation built on Sept. 5, 2024, 9 p.m.