imp_assert-deprecated {ympes}R Documentation

Deprecated assertion functions

Description

These assertions functions are now deprecated and may be defunct as soon as the next release of ympes.

Usage

imp_assert_integer(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_int(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_double(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_dbl(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_numeric(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_num(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_logical(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_lgl(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_character(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_chr(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_data_frame(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_list(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_scalar_integer(
  x,
  arg = deparse(substitute(x)),
  call = sys.call(-1L)
)

imp_assert_scalar_int(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_scalar_double(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_scalar_dbl(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_scalar_numeric(
  x,
  arg = deparse(substitute(x)),
  call = sys.call(-1L)
)

imp_assert_scalar_num(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_scalar_logical(
  x,
  arg = deparse(substitute(x)),
  call = sys.call(-1L)
)

imp_assert_scalar_lgl(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_bool(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_boolean(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_scalar_character(
  x,
  arg = deparse(substitute(x)),
  call = sys.call(-1L)
)

imp_assert_scalar_chr(x, arg = deparse(substitute(x)), call = sys.call(-1L))

imp_assert_string(x, arg = deparse(substitute(x)), call = sys.call(-1L))

Arguments

x

Argument to check.

arg

Name of argument being checked (used in error message).

call

Call to use in error message.

Details

Assertions for function arguments. Motivated by vctrs::vec_assert() but with lower overhead at a cost of less informative error messages. Designed to make it easy to identify the top level calling function whether used within a user facing function or internally.

Value

The input argument (invisibly) if the assertion succeeds (error otherwise).


[Package ympes version 0.3.0 Index]