make_inheritance_checks: Check that a set of arguments inherits from a set of classes...

View source: R/make_inheritance_checks.R

make_inheritance_checksR Documentation

Check that a set of arguments inherits from a set of classes Throws an exception if one argument does not pass the checks. Argument must have AT LEAST ONE of the specified classes to pass.

Description

Check that a set of arguments inherits from a set of classes Throws an exception if one argument does not pass the checks. Argument must have AT LEAST ONE of the specified classes to pass.

Usage

make_inheritance_checks(arguments, target_classes, ignore_null = TRUE)

Arguments

arguments

a list object containing argument_name=argument pairs for each argument. Argument names must be provided or else they will be ignored.

target_classes

character vector of the classes to check for.

ignore_null

boolean. Indicates whether to ignore arguments with value NULL (TRUE) or to throw an exception (FALSE). Default = TRUE.


Health-SocialCare-Scotland/phsmethods documentation built on Jan. 28, 2024, 3:18 a.m.