error_nonpositive_value: Check non-negativity

Description Usage Arguments Value Examples

View source: R/main.R

Description

Stops code if x is not >=0.

Usage

1
error_nonpositive_value(x, variable_name)

Arguments

x

numeric vector.

variable_name

name of object x.

Value

Error message if any component of x < 0.

Examples

1
2
3
## Returns error (not run)
##test <- c(-1,2)
##error_nonpositive_value(test,get_variable_name(test))

tpgarcia/stride documentation built on March 18, 2021, 3:42 p.m.