Skip to contents

Internal helper used by filter_scores() and impute_missing_scores() to check that a user-supplied strategy function has at least the required named formals. This catches common mistakes early (e.g. forgetting the compare argument) without constraining the strategy author to a specific internal type.

Usage

assert_strategy(strategy, required)

Arguments

strategy

A function.

required

Character vector of formal names that strategy must accept.

Value

invisible(NULL). Called for its side effect of erroring when the check fails.