R/debug.R

Defines functions catIfDebug mwDebugMode mwUndebug mwDebug

mwDebug <- function() {
  options(mwDebug = TRUE)
}

mwUndebug <- function() {
  options(mwDebug = FALSE)
}

mwDebugMode <- function() {
  res <- getOption("mwDebug")
  if (is.null(res)) res <- FALSE
  res
}

catIfDebug <- function(...) {
  if (mwDebugMode()) cat(..., "\n")
}

Try the manipulateWidget package in your browser

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

manipulateWidget documentation built on Oct. 5, 2021, 9:10 a.m.