
Last chance! 50% off unlimited learning
Sale ends in
call_modify(.call = NULL, ..., .args = list(), .env = NULL)
NULL
to remove
arguments....
. If not supplied, it is
retrieved from call
if the latter is a frame object or a
formula.call <- quote(mean(x, na.rm = TRUE))
# Modify an existing argument
call_modify(call, na.rm = FALSE)
call_modify(call, x = quote(y))
# Remove an argument
call_modify(call, na.rm = NULL)
# Add a new argument
call_modify(call, trim = 0.1)
# Add an explicit missing argument
call_modify(call, na.rm = quote(expr = ))
# Supply a list of new arguments with .args
newargs <- list(na.rm = NULL, trim = 0.1)
call_modify(call, .args = newargs)
# If the call is missing, the parent frame is used instead.
f <- function(bool = TRUE) call_modify(.args = list(bool = FALSE))
f()
Run the code above in your browser using DataLab