input_param_checker: Check Input Parameters

Description Usage Arguments Value

View source: R/utils.R

Description

Verifies correct class and, optionally, verifies existence in a data frame

Usage

1
2
3
4
5
6
7
8
9
input_param_checker(
  x,
  check_class = NULL,
  check_names = NULL,
  null_ok = T,
  na_ok = NULL,
  exclusions = NULL,
  max_length = NULL
)

Arguments

x

Single object name, character, or vector of characters

check_class

Vector of correct classes in character format

check_names

Default: NULL. Optional data frame to check if x exists in the data frame.

null_ok

Default: T. Allow x to be NULL. If x is NULL, bypass checking.

na_ok

Default: NULL. Allow x to be NA. If na_ok is NULL, no NA check will occur.

exclusions

Default: NULL. Optional values that are excluded from checking in check_names (if it is not NULL).

max_length

Default: NULL. Optional maximum length of x. If NULL, no max length check will occur.

Value

Stop error, if an error is found. Else nothing.


mdsstat documentation built on March 13, 2020, 2:58 a.m.