pharmaverse / examples

End to end examples of pharmaverse packages for common safety clinical reporting analyses
https://pharmaverse.github.io/examples/
Apache License 2.0
6 stars 6 forks source link

Closes #49 add hook purl for scripts #51

Closed jeffreyad closed 4 months ago

jeffreyad commented 6 months ago

The scripts are generated when rendered from knitr::hook_purl. The scripts are added to repo once and then would only need to be updated when .qmd files are updated.

If we wanted a more manual process instead, we could add something like this to the tops of the .qmd files. Then the scripts would only be generated in Posit Cloud or downloaded version.

# Run this code to extract an R script
knitr::purl("adam/adppk.qmd", output = "scripts/adppk.R")
rossfarrugia commented 6 months ago

oh cool @jeffreyad! happy to defer this one to @can-taslicukur and @bms63 to review and merge if they agree its an easily sustainable solution.

Maybe worth also adding something to the README for this? as we'll need to ensure all new examples include this.

bms63 commented 6 months ago

Way cool Jeff!! Please incorporate @can-taslicukur advice.

Perhaps we can keep looking for ways to simplify this to reduce overhead...but thank you for making this happen!

bms63 commented 5 months ago

whoa... @jeffreyad sorry I forgot about this one. Is this good to go?

bms63 commented 4 months ago

@jeffreyad did you implement @rossfarrugia requests?

jeffreyad commented 4 months ago

@jeffreyad did you implement @rossfarrugia requests?

@bms63 I haven't had time to get back to this. I'll try to take a look.