@@ -16,29 +16,30 @@ require("xtable")
1616require("tibble")
1717require("readr")
1818options(width = 60)
19- opts_chunk$set(cache= FALSE)
19+ opts_chunk$set(cache = FALSE)
2020
21- root = find_root("codecheck.yml")
21+ root <- find_root("codecheck.yml")
2222```
2323
2424``` {r codecheck_logo, echo=FALSE,results='asis'}
2525latex_codecheck_logo()
2626```
2727
2828``` {r manifest, eval=TRUE, include=FALSE}
29- metadata = codecheck_metadata(root)
30- manifest = metadata$manifest
29+ metadata <- codecheck_metadata(root)
30+ manifest <- metadata$manifest
3131
32- dest_dir = file.path(root, "codecheck", "outputs")
32+ dest_dir <- file.path(root, "codecheck", "outputs")
3333## Create the outputs directory if missing
34- if ( !dir.exists(dest_dir) ) {
34+ if (!dir.exists(dest_dir) ) {
3535 dir.create(dest_dir)
3636}
3737
38- manifest_df = copy_manifest_files(root, metadata,
38+ manifest_df <- copy_manifest_files(root, metadata,
3939 dest_dir, keep_full_path = FALSE,
4040 overwrite = FALSE
4141 )
42+ # manifest_df <- list_manifest_files(root, metadata, dest_dir)
4243```
4344
4445---
@@ -92,16 +93,16 @@ I suggest to the authors to consider the following suggestions for their next pu
9293# Manifest files
9394
9495``` {r, echo=FALSE, results="asis", width=100}
95- for(i in c(1:nrow(manifest_df))) {
96- path <- manifest_df[i,"dest"]
96+ for (i in c(1:nrow(manifest_df))) {
97+ path <- manifest_df[i, "dest"]
9798 if(stringr::str_ends(path, "(png|pdf|jpg|jpeg)")) {
9899 # include graphics with knitr has to happen at top level in chunks, see https://github.com/yihui/knitr/issues/1260
99100 # see also https://stackoverflow.com/questions/51268623/insert-images-using-knitrinclude-graphics-in-a-for-loop
100101 # knitr::include_graphics(manifest_df[1, "dest"], error = TRUE)
101102 # Therefore, generate Markdown code here:
102103 cat("## ", basename(path), "\n\n")
103104 cat("**Comment:** ", manifest_df[i,"comment"], "\n\n")
104- cat(paste0("\n"))
105+ cat(paste0("![", manifest_df[i,"comment"] , "](", path, ")\n"))
105106 } else if (stringr::str_ends(path, "(Rout|txt)")) {
106107 cat("## ", basename(path), "\n\n")
107108 cat("\\scriptsize \n\n", "```txt\n")
0 commit comments