insightsengineering / teal.reporter

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

Move internal examples from `dev/` folder into regular `R/*.R` files and use `getFromNamespace()` instead of `:::` #238

Closed m7pr closed 5 months ago

m7pr commented 5 months ago

This file https://github.com/insightsengineering/teal.reporter/blob/main/dev/internal_examples.R was created out of multiple examples of internal functions that used :::. The usage of ::: in CRAN is highly discouraged. Since we wanted to keep those examples for future developers, but not necessarily pack them in the package we moved them to dev/ folder. dev/ folder is listed in .Rbuildignore and is not included in R package during the build.

After an internal discussion about the same manner for teal.code package we decided to keep internal examples in their respective R/*.R files. However we decided to substitute ::: with getFromNamespace() function.