inst/extdata/tools/QualityConfirm/utils.R

# Orther function

# Functions used in initialize ----------------------------------------- Set default args
SetDefault <- function(inarg, default) {
  if (class(inarg) == "NULL") {
    return(default)
  } else if (class(inarg) == "character" && inarg == "") {
    return(default)
  } else if (class(inarg) == "integer" && (length(inarg) == 0 || is.na(inarg))) {
    return(default)
  } else {
    return(inarg)
  }
  # if (is.null(inarg)) { return(default) } else if (inarg == '') { return(default) } else if
  # (is.na(inarg)) { return(default) } else { return(inarg) }
}

# Make dir which not exist
MakeDir <- function(checkDir) {
  if (!dir.exists(checkDir)) {
    dir.create(checkDir)
  }
}

Try the ngstk package in your browser

Any scripts or data that you put into this service are public.

ngstk documentation built on May 2, 2019, 9:19 a.m.