exit_from_parent_function function

Exit from a Parent Function

Exit from a Parent Function

exit_from_parent_function( n = 1, silent = FALSE, message = "Exiting from a parent function" )

Arguments

  • n: the number of generations to go back (default = 1)
  • silent: logical. If silent = TRUE, a message will be printed.
  • message: message to print

Examples

fn1 <- function() { print(1) print(2) } fn1() fn2 <- function() { print(1) exit_from_parent_function() print(2) } fn2()