R/function-template.R

Defines functions function_template

Documented in function_template

#' Function Template
#'
#' A function template.
#' 
#' @param x A flag specifying whether to return TRUE or FALSE.
#' @param chk A flag specifying whether to check inputs.
#' @return A flag.
#' @export
#'
#' @examples
#' function_template()
#' function_template(FALSE)
function_template <- function(x = TRUE, chk = TRUE) {
  if(isTRUE(chk)) {
    chk_flag(x)
  }
  x
}
audrey-b/miscutils documentation built on Nov. 3, 2019, 2 p.m.