Makes a copy of a function with new defaults. Similar to purrr::partial
except that arguments with new defaults still accept input.
Arguments
- .f
function
- ...
<
dynamic-dots
> new defaults
Examples
squircle <- redefault(ob_ellipse, m1 = 4)
squircle(a = 3)
#> <ggdiagram::ob_ellipse>
#> @ center: <ggdiagram::ob_point>
#> @ x: num 0
#> @ y: num 0
#> @ a : num 3
#> @ b : num 3
#> @ angle : <ggdiagram::radian>
#> @ radian: num 0
#> @ m1 : num 4
#> @ m2 : num 4
#> Other props: label, alpha, color, fill, linewidth, linetype,
#> n, area, bounding_box, focus_1, focus_2, length,
#> perimeter, polygon, style, tibble, angle_at, geom,
#> normal_at, place, point_at, tangent_at, aesthetics