Skip to contents

Get the missing arguments from the function as character

Usage

missing_args(
  calling_function = rlang::caller_fn(1),
  corresponding_call = sys.call(1),
  include_null = TRUE,
  exclude_defaults = TRUE
)

Arguments

calling_function

(function) see caller_fn or sys.function

corresponding_call

(call) The call where the calling_function is called. See trace_back or sys.call

include_null

(logical) Include args set to NULL?

exclude_defaults

(logical) Exclude arguments wth defaults?

Value

(character)

Examples

a <- function(a, b = NULL, c = "d") {
  missing_args()
}
a()
#> Error in match.call(definition, call, expand.dots, envir): unused arguments (new_process = FALSE, install = FALSE)