onarg {dostats} | R Documentation |
change first argument of a function
Description
change first argument of a function
Usage
onarg(f, arg)
Arguments
f |
the function |
arg |
the argument to be called as the first argument |
Value
a function that calls f
with arg
as the first argument.
See Also
Examples
formals(runif)
onarg(runif, 'max')(1:10, 1)
onarg(runif, 'max')(1:10, 10)
#another version of contains
onarg(`%in%`, 'table')(letters, 'y')
[Package dostats version 1.3.3 Index]