function_defaults: Get default function arguments

View source: R/function_defaults.R

function_defaultsR Documentation

Get default function arguments

Description

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

Other function helpers: do.call_timed(), function_arguments(), function_body(), quiet(), timed(), try_silent(), variable_name()

Examples

f <- function(a, b = 1, c = "", ...) { }
function_defaults(f)
function_defaults(f, exclude = "b")

oeli documentation built on Oct. 16, 2024, 5:08 p.m.