Stop a function early without an error.

stop_early(msg = "Exiting function early.")

Arguments

msg

Message to print.

Value

Null

Examples

testfun <- function(...) {stop_early(); message("Completed function."); 1}
if(interactive()) testfun()