Skip to contents

[Maturing]

grab_fun_par() grabs all parameters defined in a function. It's particularly useful when you need to pass all parameters from one function to another (e.g., using do.call()).

Credits: Function adapted from B. Christian Kamgang's contribution in a Stack Overflow discussion.

Usage

grab_fun_par()

Value

A list containing the parameters of the function from which it was called.

Examples

foo <- function(a = 1) grab_fun_par()

foo()
#> $a
#> [1] 1
#> 
#> $a # Expected
#> [1] 1