stopif {HKRbook}R Documentation

stopif

Description

A equivalent to stopifnot: if cond is TRUE then a error is thrown.

Usage

stopif(cond, txt)

Arguments

cond

logical: condition to test

txt

character: error message

Value

nothing

Examples

if (interactive()) stopif(1+1==2, "1+1 can not be 2, this is fake science!")

[Package HKRbook version 0.1.3 Index]