new_partialised | R Documentation |
Create partialised functions
new_partialised(f, args = list(), ..., class = character())
f |
A function. |
args |
A list of default arguments. |
... |
Additional arguments for attributes. |
class |
Name of subclass. |
A partialised
function.
purrr::partial()
dist <- function(x, y) { sqrt(x ^ 2 + y ^ 2) } pdist <- new_partialised(dist, list(x = 3)) pdist(y = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.