Not the complete answer, but I would say that if you want to run in turns, it is probably best to do this in a real R session until you figure out what you really want.
If you really want to get the results in several stages, you can split the code into several blocks and they will use one session of the session of the R session
Stefan avey
source share