insightsengineering / teal.reporter

Create and preview reports with Shiny modules
https://insightsengineering.github.io/teal.reporter/
Other
8 stars 9 forks source link

Improve the Reproducibility Mechanisms and Code Display in Report Output #280

Open donyunardi opened 4 months ago

donyunardi commented 4 months ago

Improve Reproducibility Mechanism

When a user utilizes the teal.reporter feature in their teal app and clicks the Download Report button from the Reporter previewer module, they will receive:

The Rmd file that the user receives will not generate new output (plot or table) if they change the R code section in the Rmd because:

  1. The code is not re-evaluated when the Rmd is knitted, as the R code chunk option is set to eval=FALSE.
  2. The plots or table image is embedded in the Rmd file using knitr::include_graphics or readRDS.

This means the Rmd file is static and the plots or tables are not reproducible. To make the Rmd reproducible, new output should be generated when it's knitted. Outputs should not be embedded (as in step 2) in the Rmd file.

Improve Code Display

We also want to improve how the code is displayed in the output report (and possibly in Rmd) because it is currently shown as one long line of code, regardless of the programming steps (e.g., data processing, filtering, plotting, etc.).

Users will have more clarity and readability if we can provide sections for the code in the report.

Definition of Done

Issues: