I use org mode for reproducible research and literate programming, mainly using R for computations. I'm new to emacs.
If I'm starting a new R session or my session is interrupted, I will have to rerun a number of code chunks. This is very easy with the speed commands (typing "e" to evaluate the chunk, then "n" to move to the next). I love this feature, the only problem is that my headers and subtrees are then expanded and I have to close them again to keep the page tidy.
Is there an existing feature or lisp expression to evaluate all code chunks below a header? And is it possible to do this without expanding the content below?
many thanks
For example, if the cursor were at the start of header 1, could you evaluate the code chunks under header 2 and 3 with a single command?
* header 1
** header 2
#+BEGIN_SRC R
print("hello")
#+END_SRC
** header 3
#+BEGIN_SRC R
print("world")
#+END_SRC