R/add.snippet.clear.R

Defines functions add.snippet.clear

Documented in add.snippet.clear

#' Snippet R function to clear console and set directory
#'
#' Shorthand to add clear console code to current file
#'
#' @return Inserts code to clear console
#'
#' @examples
#' if(interactive())
#' add.snippet.clear()
#' @export
#'

add.snippet.clear <- function() {
  insertInText(paste0("
# script header
quickcode::libraryAll(
  ...
)
quickcode::clean(
  setwd = './'
)

# script body





# session information
  sessionInfo()
"))
}

Try the quickcode package in your browser

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

quickcode documentation built on April 11, 2025, 5:49 p.m.