Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from reconhub/fix74
fix for #74
- Loading branch information
Showing
6 changed files
with
144 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#' List files and timestamps within the report sources folder | ||
#' | ||
#' @inheritParams compile_reports | ||
#' @param directories should directories be listed | ||
#' | ||
#' @noRd | ||
list_report_folder_files <- function(factory = ".", directories = FALSE) { | ||
|
||
# validate and get the root / report_sources directories of the factory | ||
tmp <- validate_factory(factory) | ||
root <- tmp$root | ||
report_sources <- tmp$report_sources | ||
|
||
# get a listing of all files and folders in report_sources | ||
f <- list.files( | ||
file.path(root, report_sources), | ||
recursive = TRUE, | ||
include.dirs = directories | ||
) | ||
f <- file.path(root, report_sources, f) | ||
|
||
data.frame(files = f, modified = file.mtime(f)) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tests/testthat/test_reports/simple_with_figures_folder.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: "Simple Report with figures folder" | ||
output: | ||
html_document: default | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(fig.path = "figures/") | ||
``` | ||
|
||
# Test Plot | ||
You can also embed plots, for example: | ||
|
||
```{r pressure, echo = FALSE} | ||
plot(pressure) | ||
``` | ||
|