match_formals: Match formals to a list of arugments

Description Usage Arguments Value

View source: R/utility.R

Description

Given a list formals of function arguments, check whether the arguments provided in ... and matches the signature given by the list. If it matches, return the arguments in the same order as formals. If it does not match, raise an exception.

Usage

1
match_formals(formals, ..., .args = NULL, .force = TRUE)

Arguments

formals

A list of formal arguments to match.

...

Arguments to match against formals.

.args

Optional list of arguments to match against formals.

.force

Logical; If TRUE, forces evaluation of the arguments.

Value

A unlisted list containing correctly ordered arguments from ... and .args. Throws an error if this is not possible to do.


JonasMoss/straussR documentation built on May 17, 2019, 7:02 p.m.