diff --git a/for-developers/sandbox/report-1.Rmd b/for-developers/sandbox/report-1.Rmd index 5dcf3b8..4d583a0 100644 --- a/for-developers/sandbox/report-1.Rmd +++ b/for-developers/sandbox/report-1.Rmd @@ -8,6 +8,8 @@ output: toc_float: true number_sections: true # css: ../analysis/common/styles-1.css +params: + path_checks: "not-set" --- @@ -50,16 +52,20 @@ requireNamespace("DT") ```{r declare-globals, echo=echo_chunks, results='show', message=FALSE} -``` - - -```{r, echo=echo_chunks, message=FALSE} - #Put presentation-specific code in here. It doesn't call a chunk in the codebehind file. +path_checks <- + if (params$path_checks == "not-set") { + system.file("derived/biochemical.rds", package = "trawler") + } else { + params$path_checks + } + +checkmate::assert_character(path_checks, any.missing = FALSE, len = 1) +checkmate::assert_file_exists(path_checks, extension = "rds") ``` ```{r load-data, echo=echo_chunks, results='show', message=FALSE} -checks <- readRDS(system.file("derived/biochemical.rds", package = "trawler")) +checks <- readRDS(path_checks) ``` diff --git a/for-developers/sandbox/report-1.html b/for-developers/sandbox/report-1.html index e84f37f..ecd118f 100644 --- a/for-developers/sandbox/report-1.html +++ b/for-developers/sandbox/report-1.html @@ -242,7 +242,7 @@