check_is_integerish: Check if a variable is integerish

View source: R/type_checks.R

check_is_integerishR Documentation

Check if a variable is integerish

Description

Check if a variable is integerish

Usage

check_is_integerish(
  x,
  allow_null = FALSE,
  allow_na = TRUE,
  .x_name = rlang::caller_arg(x),
  .call = rlang::caller_env(),
  .class = .error_class
)

check_is_numeric(
  x,
  allow_null = FALSE,
  allow_na = TRUE,
  .x_name = rlang::caller_arg(x),
  .call = rlang::caller_env(),
  .class = .error_class
)

Arguments

x

the variable to check

allow_null

allow check to pass if x is null

allow_na

allow chechk to pass if x contains na

.x_name

the name of x in the parent environment

.call

The caller enviroment, used to get the name of the function that called the check

.class

The class of the error, defaults to 'checkr_error'

Value

TRUE invisibly if the variable is integerish

Functions

  • check_is_numeric(): check that a variable is numeric


kristianSN/checkR documentation built on Dec. 12, 2023, 10:45 a.m.