Skip to contents

Makes a copy of a function with new defaults. Similar to purrr::partial except that arguments with new defaults still accept input.

Usage

redefault(.f, ...)

Arguments

.f

function

...

<dynamic-dots> new defaults

Value

function

Examples

squircle <- redefault(ob_ellipse, m1 = 4)
squircle(a = 3)
#> 
#> ── <ob_ellipse> 
#> # A tibble: 1 × 7
#>       x     y     a     b angle    m1    m2
#>   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1     0     0     3     3     0     4     4