Attach a generated section to a guide

add_section(
  guide,
  title,
  content,
  type = c("datasets", "findings", "programs", "other")
)

Arguments

guide

A reviewerguider_guide object (see guide_spec()).

title

Section heading, e.g. "Dataset Inventory".

content

A tibble, typically the output of section_datasets(), section_findings() or section_programs().

type

Section kind, used to label the section when the guide is printed or rendered.

Value

guide with the new section appended.

Examples

guide <- guide_spec("CDISCPILOT01", type = "sdrg")
adsl <- read.csv(system.file("extdata", "adsl.csv", package = "reviewerguider"))
guide <- add_section(guide, "Dataset Inventory", section_datasets(list(adsl = adsl)),
                      type = "datasets")
guide
#> 
#> ── CDISCPILOT01 reviewer's guide (SDRG) ────────────────────────────────────────
#>  1 section(s)
#>  [datasets] Dataset Inventory  -  1 row(s)