get_args: Get arguments from a function

View source: R/utilities.R

get_argsR Documentation

Get arguments from a function

Description

Extracts the names of the arguments from a function, and creates a list of those arguments where they exist in ... .

Usage

get_args(FUN, args_list = NULL, ...)

Arguments

FUN

function for which to find arguments

args_list

a list of arguments. Defaults to NULL.

...

any arguments. Those necessary for FUN must be named as appropriate for FUN

Value

list of arguments for FUN

Examples

myargs <- get_args(lm, formula = Sepal.Length ~ Sepal.Width, data = iris )
summary(do.call('lm', myargs))

inferference documentation built on June 8, 2025, 1:34 p.m.