check_args: Assert none of the arguments of a function are null.

View source: R/check_args.R

check_argsR Documentation

Assert none of the arguments of a function are null.

Description

Checks all the arguments in the parent function and makes sure that none of them are NULL

Usage

check_args(ignore, select)

Arguments

ignore

optionally ignore a few variables for checking [character vector].

select

optionally only check a few variables of the function [character vector].

Examples


myfunc <- function(verbose = get_opts("verbose"), b = get_opts("b")){
  check_args()
}

set_opts(verbose = 1)
## this will throw an error, suggesting b is not defined properly
try(myfunc())



sahilseth/params documentation built on Sept. 30, 2022, 10:14 a.m.