Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix https://github.com/ropensci/tarchetypes/discussions/138 #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reprex_here/reprex_subproject/_targets.R
Original file line number Diff line number Diff line change
@@ -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"))
2 changes: 1 addition & 1 deletion reprex_here/reprex_subproject/_targets/meta/meta
Original file line number Diff line number Diff line change
@@ -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||
4 changes: 2 additions & 2 deletions reprex_here/reprex_subproject/_targets/meta/process
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion reprex_here/reprex_subproject/_targets/meta/progress
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name|type|parent|branches|progress
report|stem|report|0|started
report|stem|report|0|errored
report|stem|report|0|built
8 changes: 7 additions & 1 deletion reprex_here/reprex_subproject/output/report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"))
}
)
```
Expand Down
219 changes: 208 additions & 11 deletions reprex_here/reprex_subproject/output/report.html

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions reprex_here/reprex_subproject/output/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ output:



```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()
Expand All @@ -23,16 +30,16 @@ df <- datasets::iris %>%
## setosa


![](report_files/figure-html/species_loop-setosa-1.png)<!-- -->
![](/Users/c240390/Desktop/reprex_tarchetype_rmrarkdown/reprex_here/reprex_subproject/output/report_files/species_loop-setosa-1.png)<!-- -->


## versicolor


![](report_files/figure-html/species_loop-versicolor-1.png)<!-- -->
![](/Users/c240390/Desktop/reprex_tarchetype_rmrarkdown/reprex_here/reprex_subproject/output/report_files/species_loop-versicolor-1.png)<!-- -->


## virginica


![](report_files/figure-html/species_loop-virginica-1.png)<!-- -->
![](/Users/c240390/Desktop/reprex_tarchetype_rmrarkdown/reprex_here/reprex_subproject/output/report_files/species_loop-virginica-1.png)<!-- -->