update_call: Update a call

Description Usage Arguments Value

View source: R/update_call.R

Description

The function modify_call in the pryr-package does not always do as I expect when used inside of a function, so this modified version of update_formals has been used in order to get stuff to work in a way I better understand. This approach seems to be a bit saffer in those cases where it's desired that the value NULL should be used as an argument.

Usage

1
update_call(.call, ..., .list = FALSE, .ignore = NULL)

Arguments

.call

The call we want to update.

...

dotsMethods, the arguments to be used for an update of the formals of .fun. If the arguments of interest already are stored in a list (or an environment), set the argument .list to TRUE.

.list

Logic value, default FALSE. This can be used when the stuff that we want to update with already is contained in a list or an environment. NOTE: Only the first argument given to ... will in this case be recorded!

.ignore

Character vector, default value NULL. When the arguments we want to create our call are delivered in a list or an environment, this can be used to perform a partially update, i.e. give the names of the arguments we don't want to update (yet).

Value

The result of this function is that the formals of .fun is updated at the calling environment.


LAJordanger/leanRcoding documentation built on Feb. 27, 2020, 4:42 p.m.