Replies: 1 comment
-
Version controlling could be applied to the knit file, but my preference would be to rely on the code as the source of truth. Typically for long running analyses, I opt to use the targets package, with the RMarkdown file as the final output of the pipeline. With targets, analyses can be cached so that they are only run when changes are made that affect the analysis in question. Alternatively, RMarkdown natively supports the caching of chunks, which might be something you could look into. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a researcher in the field of biology, I mainly use R in my work to generate numerous plots and visualize results in real-time. I also want my data analysis and visualization code to be under version control, along with their associated results. This is quite simple when working with Python, as I can use Jupyter Notebook. However, with R, managing RMarkdown is a bit more challenging since it is a plain text file and the visual output is not automatically integrated. I need to knit the RMarkdown file into an HTML document, similar to a Jupyter Notebook, and also version control this HTML document. But the knitting process can run for hours, for some large genomic data analysis.
One could argue that version control should only be applied to the code itself, and that the visual results are artifacts built from the code and shouldn't be version-controlled. However, in practice, the analysis code takes a long time to run. Storing the output results in Git allows me to quickly view the historical results, which is extremely useful.
I choose not to use Jupyter Notebook with IRKernel because the vscode-r extension has limited support for Jupyter Notebook with IRKernel, making it difficult to obtain a satisfactory user experience.
Therefore, I would like to hear from more experienced folks on how they manage their code and visual output when working with RMarkdown in VSCode. Your suggestions and insights are greatly appreciated.
I have cross-posted it at r/bioinformatics
Beta Was this translation helpful? Give feedback.
All reactions