Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rst_list

Restarts utilities


Description

Questioning lifecycle

Restarts are named jumping points established by with_restarts(). rst_list() returns the names of all restarts currently established. rst_exists() checks if a given restart is established. rst_jump() stops execution of the current function and jumps to a restart point. If the restart does not exist, an error is thrown. rst_maybe_jump() first checks that a restart exists before jumping.

Usage

rst_list()

rst_exists(.restart)

rst_jump(.restart, ...)

rst_maybe_jump(.restart, ...)

Arguments

.restart

The name of a restart.

...

<dynamic> Arguments passed on to the restart function.

Life cycle

All the restart functions are in the questioning stage. It is not clear yet whether we want to recommend restarts as a style of programming in R.

See Also


rlang

Functions for Base Types and Core R and 'Tidyverse' Features

v0.4.11
MIT + file LICENSE
Authors
Lionel Henry [aut, cre], Hadley Wickham [aut], mikefc [cph] (Hash implementation based on Mike's xxhashlite), Yann Collet [cph] (Author of the embedded xxHash library), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.