Skip to contents

Assert Argument is an Expression

Usage

assert_expr(arg, optional = FALSE)

Arguments

arg

A function argument to be checked

optional

Is the checked argument optional? If set to FALSE and arg is NULL then an error is thrown

Value

The function throws an error if arg is not an expression, i.e. either a symbol or a call, or returns the input invisibly otherwise