Skip to contents

This function returns the default function arguments (if any).

Usage

function_defaults(f, exclude = NULL)

Arguments

f

[function]
A function.

exclude

[NULL | character()]
Argument names to exclude.

Can be NULL (default) to not exclude any argument names.

Value

A named list.

See also

Examples

f <- function(a, b = 1, c = "", ...) { }
function_defaults(f)
#> $b
#> [1] 1
#> 
#> $c
#> [1] ""
#> 
function_defaults(f, exclude = "b")
#> $c
#> [1] ""
#>