Skip to contents

Converts the default values of a function's arguments to variables and attaches them to the global environment

Usage

attach_function(f)

Arguments

f

Function

Value

Attaches function arguments to global environment

Examples

my_function <- function(x, y = 2) x + y

# Sets y to 2
attach_function(my_function)