https://www.garrickadenbuie.com/blog/convert-r-markdown-rmd-...
Now you have:
- single file (Rmd, plain text) where you can do any edits, which, when compiled, produces:
- (1) you get story, code and results in a single package: one output file (usually, html), where all inputs and outputs are stored together (or, just the outputs, if you turn off echo'ing, e.g. for producing a report),
- (2) you get the code: another output file, which is a simple R script version of your Rmd file.
Code updates to the Rmd are viewable much easier on the output R script (#2), which is also much more convenient for debugging. For static text updates, I look at the Rmd file. For content updates (e.g. did my data change between the runs?), I look at the html (or Word or PDF etc) file (#1).
1. save code and output separately, so you can save the output (but not comparing the output versions), or always generate output from scratch when needed (this actually help to ensure reproducibility)
2. or you can use R notebook format, which save the result with document together, in some companion folders.
Plus you get the option of rendering an HTML which IMO is no different than having a jupyter file.
In .rmd the notebook is just markdown where code segments inside triple backticks can be executed.
That sounds nice and git compatible (and it is), but you lose a lot of the convenience of Jupiter notebook, namely that output isn’t stored together with input.
The nice thing about Jupyter notebooks is you get story, code and results in a single package.