insightsengineering / tlg-catalog

A catalog of Tables, Listings and Graphs (TLGs) created with NEST R packages
https://insightsengineering.github.io/tlg-catalog/
Other
20 stars 8 forks source link

Merger draft to discuss #47

Closed Melkiades closed 1 year ago

Melkiades commented 1 year ago

The problem is code duplication. Viable solutions:

  1. Keep "Book" package and "Test" package separated but have the code in the form of text (and tested/executed with eval(parse(text=<>)). Then in Quarto here it is just printed out as it is done in teal.gallery (https://insightsengineering.github.io/teal.gallery/main/articles/sources.html and https://github.com/insightsengineering/teal.gallery/blob/main/vignettes/sources.Rmd#L33).
  2. Have only one package with the same scda.test structure but with "Book" generating features.

Note: teal.gallery gets the source code from the source files with https://github.com/insightsengineering/teal.gallery/blob/00547871a0a0131857dc6938ea153edad3df2c5c/R/utils.R#L27

This Draft PR just shows the wiz of it. The print is identical but the show-code which can be probably fixed