From dda6d414f618064a109867805ebb0e750f8f8799 Mon Sep 17 00:00:00 2001 From: Luis Moris Fernandez Date: Wed, 5 Jun 2024 12:36:48 +0200 Subject: [PATCH] add pkgdown examples to qc documentation --- .../pkgdown_examples/vignettes/_pkgdown.yml | 18 +++++++++++ .../pkgdown_examples/vignettes/qc.Rmd | 32 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 inst/validation/pkgdown_examples/vignettes/_pkgdown.yml create mode 100644 inst/validation/pkgdown_examples/vignettes/qc.Rmd diff --git a/inst/validation/pkgdown_examples/vignettes/_pkgdown.yml b/inst/validation/pkgdown_examples/vignettes/_pkgdown.yml new file mode 100644 index 0000000..bb1ae5e --- /dev/null +++ b/inst/validation/pkgdown_examples/vignettes/_pkgdown.yml @@ -0,0 +1,18 @@ +template: + bootstrap: 5 + +navbar: + type: inverted + structure: + left: [intro, reference, articles, tutorials, news, qc] + components: + qc: + text: Quality Control + href: articles/qc.html + +articles: + +- title: Quality Control + desc: Quality Control + contents: + - qc diff --git a/inst/validation/pkgdown_examples/vignettes/qc.Rmd b/inst/validation/pkgdown_examples/vignettes/qc.Rmd new file mode 100644 index 0000000..87bb735 --- /dev/null +++ b/inst/validation/pkgdown_examples/vignettes/qc.Rmd @@ -0,0 +1,32 @@ +--- +title: "Quality Control" +output: + rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Quality Control} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + echo = FALSE +) +``` + +```{r, params, echo = FALSE, include = FALSE} +val_param_rds <- "../inst/validation/results/val_param.rds" +val_param_rds_exists <- file.exists(val_param_rds) +if (file.exists(val_param_rds)) params <- readRDS(val_param_rds) +``` + +```{r, results = "asis", echo = FALSE} +if (val_param_rds_exists) { + res <- knitr::knit_child("../inst/validation/val_report_child.Rmd", quiet = TRUE, envir = environment()) + cat(res, sep = "\n") +} else { + "No quality control results found" +} +```