Learn R Programming

oeli (version 0.5.2)

function_arguments: Get function arguments

Description

This function returns the names of function arguments.

Usage

function_arguments(f, with_default = TRUE, with_ellipsis = TRUE)

Value

A character vector.

Arguments

f

A function.

with_default

Either TRUE to include function arguments that have default values, or FALSE else.

with_ellipsis

Either TRUE to include the "..." argument if present, or FALSE else.

Examples

Run this code
f <- function(a, b = 1, c = "", ...) { }
function_arguments(f)
function_arguments(f, with_default = FALSE)
function_arguments(f, with_ellipsis = FALSE)

Run the code above in your browser using DataLab