4
4
toc : false
5
5
includes :
6
6
in_header : codecheck-preamble.sty
7
+ latex_engine : xelatex
7
8
---
8
9
9
10
``` {r rsetup,eval=TRUE,include=FALSE}
@@ -51,7 +52,6 @@ latex_summary_of_metadata(metadata)
51
52
latex_summary_of_manifest(metadata, manifest_df, root)
52
53
```
53
54
54
-
55
55
# Summary
56
56
57
57
This code was (not) straightforward to codecheck.
@@ -70,10 +70,12 @@ This took ... minutes to complete on {a large workstation, my laptop}.
70
70
71
71
\clearpage
72
72
73
- ``` {r, echo=FALSE, results="asis"}
73
+ # Manifest files
74
+
75
+ ``` {r, echo=FALSE, results="asis", width=100}
74
76
for(i in c(1:nrow(manifest_df))) {
75
77
path <- manifest_df[i,"dest"]
76
- if(stringr::str_ends(path, "(png|pdf|jpg)")) {
78
+ if(stringr::str_ends(path, "(png|pdf|jpg|jpeg )")) {
77
79
# include graphics with knitr has to happen at top level in chunks, see https://github.com/yihui/knitr/issues/1260
78
80
# see also https://stackoverflow.com/questions/51268623/insert-images-using-knitrinclude-graphics-in-a-for-loop
79
81
# knitr::include_graphics(manifest_df[1, "dest"], error = TRUE)
@@ -82,12 +84,17 @@ for(i in c(1:nrow(manifest_df))) {
82
84
cat("**Comment:** ", manifest_df[i,"comment"], "\n\n")
83
85
cat(paste0("\n"))
84
86
} else if (stringr::str_ends(path, "(Rout|txt)")) {
85
- cat("**File: ", basename(path), "** \n\n")
87
+ cat("## ", basename(path), "\n\n")
86
88
cat("\\scriptsize \n\n", "```txt\n")
87
89
cat(readLines(path), sep = "\n")
88
90
cat("\n\n``` \n\n", "\\normalsize \n\n")
91
+ } else if (stringr::str_ends(path, "csv")) {
92
+ cat("## ", basename(path), "\n\n", "Summary statistics of tabular data:", "\n\n")
93
+ cat("\\scriptsize \n\n", "```txt\n")
94
+ print(skimr::skim(read.csv(path)))
95
+ cat("\n\n``` \n\n", "\\normalsize \n\n")
89
96
} else {
90
- cat("**File: ", basename(path), "** \n\n")
97
+ cat("## ", basename(path), "\n\n")
91
98
cat("Cannot inlcude output file as figure.")
92
99
}
93
100
0 commit comments