error_max_value: Error from exceeding maximum

Description Usage Arguments Value Examples

View source: R/main.R

Description

Reports error if x > max_x

Usage

1
error_max_value(x, max_x, variable_name)

Arguments

x

numeric vector or array object.

max_x

maximum allowed value in the vector or array.

variable_name

name of object x.

Value

Error message if any component of x is larger than max_x.

Examples

1
2
3
4
## Reports an error (not run)
##love <- c(1,2)
##max_love <- 1.5
##error_max_value(love,max_love,get_variable_name(love))

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