h_partial_fun_args: Create Partial Functions

View source: R/utils.R

h_partial_fun_argsR Documentation

Create Partial Functions

Description

Creates partial functions with arguments.

Usage

h_partial_fun_args(fun, ..., additional_attr = list())

Arguments

fun

(function)
to be wrapped.

...

Additional arguments for fun.

additional_attr

(list)
of additional attributes to apply to the result.

Details

This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing arguments in attribute args. additional_attr will override the existing attributes.

Value

Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).


mmrm documentation built on Oct. 7, 2024, 1:14 a.m.