Learn R Programming

matchr (version 0.1.0)

match_cond: Check and Evaluate Match Condition

Description

Called by Match the check whether a condition matches. Used to create custom methods for matching.

Usage

match_cond(cond, x, do, ...)

Arguments

cond

match condition

x

object being matched

do

return expression associated with the condition. If cond is matched with x, then do should be evaluated and returned in a list with TRUE: list(TRUE, eval(do)).

...

arguments passed to evaluation

Value

FALSE if no match, or a list containing TRUE and the evaluated expression

Details

See the Match details for explanations about provided methods.