R/utils.R

Defines functions missing_arg_handler

missing_arg_handler <- function() {
  defined <- ls(name = parent.frame())
  passed <- names(as.list(match.call(definition = sys.function(- 1),
                                     call = sys.call(- 1),
                                     expand.dots = TRUE
  ))[-1])
  if (any(!defined %in% passed)) {
    stop(paste("missing values for", paste(setdiff(defined, passed), collapse=", ")))
  }
}
chris-s-friedman/Friedman documentation built on Aug. 25, 2018, 2:17 p.m.