Closed abhsarma closed 2 months ago
For the second issue, I think it can be solved by again providing an optional argument to eng_r
to control the behavior of plot_counter()
which will almost always be FALSE
except for this specific use case. But I am apprehensive of just jumping to this solution. @mjskay thoughts?
hmm I dunno. What is plot_counter()
?
It's a knitr
internal function but it's not documented / described, so I have no idea---which is why I'm asking
hmm I dunno, try reading or stepping through the code to figure out what it does? Or ask the knitr folks...
the second one seems like is solved by changing the chunk label during knitting to be unique
This has been filed as an issue / PR in knitr. See: https://github.com/yihui/knitr/pull/2358 I am hoping this will be fixed when they have updated it on their end, if not it will be reopened.
As a process suggestion, if this issue is not fixed yet here and is waiting on a change in knitr, I would leave it open so that it is still tracked here (and someone coming along with that problem can find it)
We want to support export of multiverse analysis to EMARs. While we have a working implementation thanks to @hwangkyle, there are still some pending issues (including #116).
Broadly, this is due to how things are implemented in
knitr
:[x] currently,
knitr
exports the R engine which can be accessed usingknitr::knit_engines$get("R")
. But it does not allow us to change the environment in which the code is being evaluated in. This is likely a simple fix, by allowing the environment to be declared as an argument in https://github.com/yihui/knitr/blob/fb1f4231d2df7b156e314686f39fc040ce807513/R/block.R#L187[x] the output does not change unless I set
plot_counter(reset = FALSE)
in the following line: https://github.com/yihui/knitr/blob/fb1f4231d2df7b156e314686f39fc040ce807513/R/block.R#L317 I am not sure whatplot_counter()
does or why we need it so I don't know what the solution is here.