R/utils.R

Defines functions set_null_to eval_txt pkg_name

set_null_to <- function(test, default) {
  if (is.null(test)) return(default)
  test
}


eval_txt <- function(txt, allow_bare = FALSE) {
  if (class(txt) %in% "character" | allow_bare == FALSE) {
    eval(parse(text = txt))
  } else {
    txt
  }

}

pkg_name <- function() {
  "simplificar"
}
lorenzwalthert/simplificar documentation built on May 7, 2019, 9:32 a.m.