Learn R Programming

pmatch (version 0.1.4)

make_match_expr: Create an if-statement for cases_expr and cases_expr_ functions

Description

Create an if-statement for cases_expr and cases_expr_ functions

Usage

make_match_expr(expr, match_expr, continue)

Arguments

expr

The expression we pattern match against.

match_expr

The pattern specification, on the form pattern -> expression

continue

The expression that goes in the else part of the if expression. If this is NULL, we create an if-expression instead of an if-else-expression.

Value

A new if-expression