new_partialised {partialised} | R Documentation |
Create partialised functions
Description
Create partialised functions
Usage
new_partialised(f, args = list(), ..., class = character())
Arguments
f |
A function. |
args |
A list of default arguments. |
... |
Additional arguments for attributes. |
class |
Name of subclass. |
Value
A partialised
function.
See Also
Examples
dist <- function(x, y) {
sqrt(x ^ 2 + y ^ 2)
}
pdist <- new_partialised(dist,
list(x = 3))
pdist(y = 4)
[Package partialised version 0.1.1 Index]