Partial: Partial function application.

Description Usage Arguments Value See Also Examples

Description

Modify a function by pre-applying some of the arguments.

Usage

1
Partial(.f, ..., .env = parent.frame(), .lazy = TRUE)

Arguments

...

Named arguments that should be applied to .fn

.env

the environment of the created function. Defaults to parent.frame.

.lazy

If TRUE arguments are evaluated lazily.

.fn

Function to apply partially.

Value

A function.

See Also

Other Functionals: And, Call, Compose, Delay_by, Dot_every, FMap, Fail_with, Log_to, Maybe

Examples

1
2
mean1 <- Partial(mean, na.rm = TRUE)
mean1(c(1, 2, 3, NA, 4))

gschofl/gsmisc documentation built on May 17, 2019, 8:52 a.m.