powered by
Check a function has specified arguments
has_args(f, args, exact = FALSE)f %has_args% args
f %has_args% args
a function
a character vector of argument names
if TRUE, argument names must match args exactly (order and value); otherwise f just must have at least args in any order
TRUE
args
f
# NOT RUN { has_args(mean, "x") has_args(mean, "x", exact = TRUE) see_if(mean %has_args% "x") see_if(mean %has_args% "y") # }
Run the code above in your browser using DataLab