type_checks: Type Checks

type_checksR Documentation

Type Checks

Description

Misc/useful type checks to prevent duplicated code

Usage

is.scalar(x)

is.scalar_or_null(x)

is.numeric_or_null(x)

is.character_or_null(x)

is.logical_or_null(x)

is.df_or_null(x)

is.list_or_null(x)

is.atomic_nan(x)

is.irregular_list(x)

is.bad_for_calcs(x, na.rm = FALSE)

any_bad_for_calcs(x, ..., na.rm = FALSE)

all_good_for_calcs(x, ..., na.rm = FALSE)

is.bad_for_indexing(x)

is.good_for_indexing(x)

is.bad_and_equal(x, y)

is.bad_for_calcs(x, na.rm = FALSE)

is.good_for_calcs(x, na.rm = FALSE)

is.null_or_na(x)

Arguments

x

object to be tested

na.rm

If true, NA values aren't considered bad for calculations

...

Values to be testes

y

object to be tested

Value

a logical value

Author(s)

Steven Nydick, steven.nydick@kornferry.com


roperators documentation built on July 26, 2023, 5:27 p.m.