Do you know about {drake}
? You could find it very useful for your long, computation heavy task.
It analyzes your workflow, skips steps with up-to-date results, and orchestrates the rest with optional distributed computing. At the end, drake provides evidence that your results match the underlying code and data, which increases your ability to trust your research.
Building your analysis with drake will allow you to easily run only what has changed, and easily profit from distributed computing (in background, in clusters, or else) from the steps that can be run in parallel.
It could be very well suited for long running analysis. You could build drake pipelines, that ends with a reports that loads any previous result to put them in a communication ready report. The caching is already very well included in drake by default, and saves a lot. The distributed feature really helps too - and you just have to build a pipeline.
Just an idea in case you don't know this.
Also, for background process in RStudio IDE, you have the Job Pane. You can make an RScript that render your document in a clean session and launch this RScript though the job pane.
Other callr
will allow you to run a R command in background too.
I am not sure to follow completly: In RStudio, when you click on the knitr button, a new Rmarkdown pane should be opened to follow the running of the rendering process that is already in a background job. Your R console is free as you can continue to work while the rendering happens, can't you ?
It really seems to me that you need to execute your rendering on another environment than RStudio Server IDE. You could deploy and run elsewhere (HPC cluster, servers clusters, ...) - futures
and friends could help. You could also use a product like RStudio Connect to deploy your source code and let it run on another server. Using a CI can help you mange all this too.
In the end, drake pipeline and workflow seems to be aiming at helping your use case. You should really look into it, the documentation is awesome !
Hope it helps.