onarg: change first argument of a function

Description Usage Arguments Value See Also Examples

Description

change first argument of a function

Usage

1
onarg(f, arg)

Arguments

f

the function

arg

the arg to be called as the first argument

Value

a function that calls f with arg as the first argument.

See Also

wargs, dostats, and apply

Examples

1
2
3
4
5
formals(runif)
onarg(runif, 'max')(1:10, 1)
onarg(runif, 'max')(1:10, 10)
#another version of contains
onarg(`%in%`, 'table')(letters, 'y')


Search within the dostats package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.