R/show_ceremony.R

Defines functions insert_ceremony show_boilerplate ceremony_text show_ceremony

Documented in ceremony_text insert_ceremony show_boilerplate show_ceremony

#' Show the code to setup disk.frame
#' @export
show_ceremony <- function() {
  glue::glue(crayon::green(ceremony_text()))
}


#' @rdname show_ceremony
#' @export
ceremony_text <- function() {
"
# this willl set disk.frame with multiple workers
setup_disk.frame()
# this will allow unlimited amount of data to be passed from worker to worker
options(future.globals.maxSize = Inf)
"
}

#' @rdname show_ceremony
#' @export
show_boilerplate <- function() show_ceremony()

#' @rdname show_ceremony
#' @export
insert_ceremony <- function() {
  if(requireNamespace("rstudioapi")) {
    rstudioapi::insertText(ceremony_text())
  } else {
    stop("insert ceremony can only be used inside RStudio")
  }
}

Try the disk.frame package in your browser

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

disk.frame documentation built on Aug. 24, 2023, 5:09 p.m.