#' Stops the script from running if the end point exists
#' @param end_point_fn full path to the filename that indicates this script/step has been run already
#' @importFrom typewriteR stop_and_enter
#' @export
#'
brake_if_file_exists <-
function(end_point_fn) {
if (file.exists(end_point_fn)) {
typewriteR::tell_me(end_point_fn, "already exists. This script has been previously executed and will be overwritten.")
typewriteR::stop_and_enter()
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.