Open utterances-bot opened 3 years ago
Do not do complicated database queries... Sometimes, queries can take a long time to run, and you do not want to do this every time you find a typo or tweak some plot styling and want to reknit your document.
Likewise for machine learning, Bayesian statistics, statistical genomics, clinical trial simulation, spatial analysis, and all kinds of intense computation in data science.
Consider making your data pull a separate script and read the results into your RMarkdown.
targets
embraces your idea and tries to take it a step further with abstraction and orchestration (details here). Even though most of my computational work is far too demanding for R Markdown alone, I can still embed a document at the end of the pipeline for communication purposes. When I come back to a Bayesian modeling project after several months of neglect, these two systems work together well: targets
tells me which results are still up to date, and the R Markdown document helps me remember what those results mean in the first place.
Perfect -->https://tinyurl.com/becaps-life
RMarkdown Driven Development (RmdDD) | Emily Riederer
A workflow for refactoring one-time analyses to sustainable data products
https://emilyriederer.netlify.app/post/rmarkdown-driven-development/