R/utils.show.args.R

Defines functions .show.args

.show.args <- function(args, fun = ""){
  cat("\n[-- ARGS para (",fun,") -- ]")
  args.names <- names(args)
  names(args) <- NULL
  for(a in seq_along(args.names)){
    cat("\n$",args.names[a],":", sep = "")
    value.args <- unlist(args[a])

    if((length(value.args)>5) | is.list(value.args)) {
      if(length(value.args)>5) top <- 5
      else top <- length(value.args)
      cat(paste0(value.args[1:top], collapse = ","))
    }
    else cat(value.args)
    cat("\n")
  }
  cat("\n[--FIN ARGS--]\n")
}
feranpre/feR documentation built on Nov. 22, 2022, 2:29 a.m.