R/options.R

Defines functions trundler_chatty trundler_option

options.trundler <- list(
  trundler.chatty = TRUE
)

trundler_option <- function(option) {
  option <- paste0("trundler.", option)

  result <- getOption(option)
  if (!is.null(result)) {
    # Get option (if set).
    result
  } else {
    # Get default.
    options.trundler[[option]]
  }
}

trundler_chatty <- function() {
  trundler_option("chatty")
}
datawookie/trundler documentation built on Dec. 31, 2022, 6:20 p.m.