Learn R Programming

oeli (version 0.5.2)

function_defaults: Get default function arguments

Description

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

Usage

function_defaults(f, exclude = NULL)

Value

A named list.

Arguments

f

A function.

exclude

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

Examples

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

Run the code above in your browser using DataLab