Hello,
Have seen a few examples of Quarto Dashboards producing Parameterized Reports.
Would like to develop an implementation where the Dashboard produces a QMD with passed parameter values as a way to get users familiar with the use of notebooks in a current analysis workflow. A sort of Wizard for starting the analysis notebook that then commited to version control and modified as needed to produce the final QMD and its resulting report artifact.
Are there examples I might use for inspiration?
Thanks,
-Matt
If you are after parameterized QMD files that only differ by default parameter values, you could start with static files and set/update YAML front matter according to user input. CRAN: Package frontmatter should be enough for this.
For more control, e.g. changing prose without going through parameters and inline code or conditionally including/excluding chunks or whole sections, you could use templates for your QMD files, for example {{mustache}} ( CRAN: Package whisker ) or {{inja}} ( CRAN: Package jinjar ).
Asked stackoverflow's new AI assistant and it suggested writing the file using writeLines()
Seems a bit inelegant to produce a draft of a report the length I'm considering, but I think I can workaround by producing one QMD per section. Any parameterized selections from the dashboard come across as part of the writeLines() procedure.
Then to bind them up I use some convention like Quarto Book, or the functionality ported over from rmarkdown where you reference a small RMD with commonly reused content inside a chunk of a larger RMD. Seems like the later functionality is in quarto now through the includes concept.