[R] Quarto (knitr) output doesn't match script output #3398
-
Hey everybody, I am using the quarto framwork to publish my code for a journal publication. I'm running a topic model via stm and displaying some model diagnostics. Unfortunetly, the output created within my script does not match what is rendered in the html file through quarto. Let me show you what I mean: Here are the codes:
Packages:
Preprocessing:
Execution:
I am grateful for every hint or information. Things I have tried so far:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Could you share a reproducible example exhibiting this behaviour which seems to be tied up with the random number generator. Also, a workaround could be to externalise the computation (as pre-render script if you really want it to be linked to the document), then load the results in Quarto for rendering only. |
Beta Was this translation helpful? Give feedback.
Could you share a reproducible example exhibiting this behaviour which seems to be tied up with the random number generator.
Does your script with the seed set properly generates the exact same output? If this is not the case, then there is absolutely no way Quarto can.
Also, a workaround could be to externalise the computation (as pre-render script if you really want it to be linked to the document), then load the results in Quarto for rendering only.