render_guide.RdAssembles a guide_spec() object's sections (and narrative) into a single
document using rmarkdown, starting from the sdrg/adrg section skeleton
shipped in inst/templates.
render_guide(guide, path, format = c("html", "md"))A reviewerguider_guide object with sections attached (see
add_section() / add_narrative()).
Output file path. The directory is created if needed.
Output format: "html" or "md".
path, invisibly.
guide <- guide_spec("CDISCPILOT01", type = "sdrg", sponsor = "Acme Pharma")
adsl <- read.csv(system.file("extdata", "adsl.csv", package = "reviewerguider"))
guide <- add_section(guide, "Dataset Inventory", section_datasets(list(adsl = adsl)),
type = "datasets")
guide <- add_narrative(guide, "Introduction",
"This SDRG accompanies the CDISCPILOT01 SDTM submission.")
out <- tempfile(fileext = ".html")
render_guide(guide, out, format = "html")
#> ✔ Rendered sdrg guide to /tmp/Rtmp6zFlNh/filebf21859fd6969.html
file.exists(out)
#> [1] TRUE