Hey all,
I have to do the same code 3 times and knit a html for the output.
The code is running in R and gives the expected tables and plots.
R output is saved into a .rda file: save(all parameters, file = "file.rda")
I open my .rmd file and start with:
---
title: "title"
author: "name"
date: "2/18/2021"
output: html_document
---
library(allrequiredones)
load("file.rda")
Now comes a list of chunks for the first one (SMDH) of three repeats, which are SMDH, MD and ROM.
Preknitting works nicely. knit
shows the first problem:
{r table2H, echo = FALSE, results = 'asis'}
table2H
{r table2W, echo=FALSE, result = 'asis'}
table2W
The first chunk is knitted, the second not.
When I delete result = 'asis'
then the second chunk is knitted, too.
When I put the r table2W
chunk in the first place, then this one is knitted, but the second one r table2H
is not.
Now I copy the whole code and only change the names of the chunks and desired tables for the 2. round = MD. Preknitting shows everything nicely. knit
shows only the first SMDH, but won't show the MD group of chunks at all. Nothing.
Now I copy again and change names of chunks and tables for the third round = ROM. Preknitting is fine.
knit
shows now the first SMDH and third ROM, but not the second group.
Summary!
Knitting shows:
- SMDH, fine
- MD nothing
- ROM fine
The code is every time the same, only the parameters change.
I tried to re-order the 3 parts and found out, that the one in the middle will never show, regardless which part it is:
- SMDH fine
- ROM nothing
- MD fine
I got one warning:
***[WARNING] Could not parse YAML metadata at line 130 column 1: :6:0: Unexpected ''*** But in my code is no unexpected '
' in line 130 - I checked and redid this line like 100times. And I have no idea about how to access YAML metadata (what is it?!) to remove the unexpected '`'.
That leaves me a little bit helpless.
Does anyone of you have any ideas about how to solve this issue?
I can provide the whole code as well, but it is a bit long, I suppose...