knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(papillon)

Build a reference page

To award people hard working for open-source, it is always good to cite their work. In order to add an informative page in your Shiny applications for instance, you can create a html or markdown page listing all package dependencies used.

papillon::create_pkg_biblio_file(to = "html", out.dir = "inst")
# Can be included in a shiny app using 
shiny::includeHTML("bibliography.html")
# OR
papillon::create_pkg_biblio_file(to = "markdown")
# Can be included in a shiny app using 
shiny::includeMarkdown("bibliography.md")

Add references to this page

desc_file <- system.file("DESCRIPTION", package = "papillon")
out.dir <- tempdir()
papillon::create_pkg_biblio_file(
  path = desc_file, to = "html",
  out.dir = out.dir, edit = FALSE)
shiny::includeHTML(file.path(out.dir, "bibliography.html"))


ThinkR-open/chameleon documentation built on Feb. 1, 2023, 5:21 p.m.