is_formula: Is the input a formula?

Description Usage Arguments Value See Also Examples

View source: R/is-formula.R

Description

Checks to see if the input is a formula.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
assert_is_formula(x, severity = getOption("assertive.severity", "stop"))

assert_is_one_sided_formula(x, severity = getOption("assertive.severity",
  "stop"))

assert_is_two_sided_formula(x, severity = getOption("assertive.severity",
  "stop"))

is_formula(x, .xname = get_name_in_parent(x))

is_one_sided_formula(x, .xname = get_name_in_parent(x))

is_two_sided_formula(x, .xname = get_name_in_parent(x))

Arguments

x

Input to check.

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

.xname

Not intended to be used directly.

Value

The is_* functions return TRUE when the input is a formula. The assert_* functions return nothing but throw an error if the corresponding is_* function returns FALSE.

See Also

is_environment and is_language

Examples

1
2

assertive.types documentation built on May 1, 2019, 10:31 p.m.