R/computation-type.R

#' @export
set_computation_type <- function(type = "lazy") {

  if (!(type %in% c("lazy", "eager"))) {
    abort(paste0("`type` must be either `'lazy'` or `'eager'` not: ", type))
  }

  options(nodegraph.computation_type = type)
}

#' @export
get_computation_type <- function() {
  getOption("nodegraph.computation_type", default = "lazy")
}
DavisVaughan/nodegraph documentation built on May 21, 2019, 10:15 a.m.