powered by
change first argument of a function
onarg(f, arg)
the function
the argument to be called as the first argument
a function that calls f with arg as the first argument.
f
arg
wargs, dostats, and apply
wargs
dostats
apply
# NOT RUN { formals(runif) onarg(runif, 'max')(1:10, 1) onarg(runif, 'max')(1:10, 10) #another version of contains onarg(`%in%`, 'table')(letters, 'y') # }
Run the code above in your browser using DataLab