stop_if: Stop if condition is met (with message)

Description Usage Arguments Value Examples

View source: R/Error_Handling.R

Description

If the condition is met, stop execution, and print an error message

Usage

1
stop_if(condition, error_msg)

Arguments

condition

Condition that, if met, will stop and print an error message.

error_msg

Message to be displayed if the stopping condition is met.

Value

Nothing.

Examples

1
2
# stop_if(TRUE, "I'm an error message") # Will stop execution and print the message
# stop_if(FALSE, "I'm an error message") # Will do nothing

KO112/KO documentation built on Oct. 2, 2020, 9:21 a.m.