R/ok.R

Defines functions ok

Documented in ok

#' Ok function to ask for yes or no
#'
#' @param question Yes/no question
#'
#' @return
#' @export
#'
#'
ok <- function(question = "Ok?") {

  ok <- ""

  while(!ok %in% c("ja", "nein")) {

    ok <- readline(paste0(question, " (ja/nein) "))

  }

  if(ok == "ja") {
    return <- TRUE
  }

  else if(ok == "nein") {
    return <- FALSE
  }

  return
}
nicohuttmann/htmnanalysis documentation built on Dec. 6, 2020, 3:02 a.m.