What runs the cells of a notebook, which decides the state each cell starts afresh with, see RunnerFreshState.
knitr, which knits R Markdown, Quarto, and knitr Sweave documents
one R session running cell after cell: a console, the # %% cells of a script, or Sweave
# %%
Sweave
What runs the cells of a notebook, which decides the state each cell starts afresh with, see RunnerFreshState.