diff --git a/reprex_here/reprex_subproject/_targets.R b/reprex_here/reprex_subproject/_targets.R index 604be94..7d2d85b 100644 --- a/reprex_here/reprex_subproject/_targets.R +++ b/reprex_here/reprex_subproject/_targets.R @@ -1,4 +1,4 @@ library(targets) library(tarchetypes) library(here) -list(tar_render(report, here("reprex_subproject/output/report.Rmd"))) +list(tar_render(report, "output/report.Rmd")) diff --git a/reprex_here/reprex_subproject/_targets/meta/meta b/reprex_here/reprex_subproject/_targets/meta/meta index 66d7a1b..8c8581a 100644 --- a/reprex_here/reprex_subproject/_targets/meta/meta +++ b/reprex_here/reprex_subproject/_targets/meta/meta @@ -1,2 +1,2 @@ name|type|data|command|depend|seed|path|time|size|bytes|format|repository|iteration|parent|children|seconds|warnings|error -report|stem||fad9418cfd722539|4745aa592080ea1d|-237041703||t19409.4211828647s||0|file|local|vector|||1.361||pandoc document conversion failed with error 99 +report|stem|2f5c4b3005668782|44e3ffe3658e1fb4|4745aa592080ea1d|-237041703|output/report.html*output/report.Rmd*output/report_files|t19410.108878107s|c4eeb01cee59a9d5|802969|file|local|vector|||4.38|| diff --git a/reprex_here/reprex_subproject/_targets/meta/process b/reprex_here/reprex_subproject/_targets/meta/process index 0eab4ff..2e703cf 100644 --- a/reprex_here/reprex_subproject/_targets/meta/process +++ b/reprex_here/reprex_subproject/_targets/meta/process @@ -1,4 +1,4 @@ name|value -pid|51593 -version_r|4.0.2 +pid|29972 +version_r|4.2.1 version_targets|0.14.2 diff --git a/reprex_here/reprex_subproject/_targets/meta/progress b/reprex_here/reprex_subproject/_targets/meta/progress index 73234e2..f66ec7d 100644 --- a/reprex_here/reprex_subproject/_targets/meta/progress +++ b/reprex_here/reprex_subproject/_targets/meta/progress @@ -1,3 +1,3 @@ name|type|parent|branches|progress report|stem|report|0|started -report|stem|report|0|errored +report|stem|report|0|built diff --git a/reprex_here/reprex_subproject/output/report.Rmd b/reprex_here/reprex_subproject/output/report.Rmd index 98318c4..1161b19 100644 --- a/reprex_here/reprex_subproject/output/report.Rmd +++ b/reprex_here/reprex_subproject/output/report.Rmd @@ -14,6 +14,12 @@ library(dplyr) library(ggplot2) ``` +```{r} +root <- rprojroot::find_root_file(criterion = "_targets.R") # Find the pipeline root directory. +knitr::opts_knit$set(root.dir = root) # Run the report from the pipeline root directory. +knitr::opts_chunk$set(fig.path = file.path(root, "output", "report_files/")) +``` + ```{r} df <- datasets::iris %>% dplyr::as_tibble() @@ -23,7 +29,7 @@ df <- datasets::iris %>% ```{r, include = FALSE} src <- lapply(c("setosa", "versicolor", "virginica"), function(species) { - knitr::knit_expand(file = here("reprex_subproject/output/template.Rmd")) + knitr::knit_expand(file = file.path(root, "output/template.Rmd")) } ) ``` diff --git a/reprex_here/reprex_subproject/output/report.html b/reprex_here/reprex_subproject/output/report.html index 5dcbc6c..5a826fc 100644 --- a/reprex_here/reprex_subproject/output/report.html +++ b/reprex_here/reprex_subproject/output/report.html @@ -14,13 +14,49 @@ Untitled - - + + - - - - + + + + - - + +