I am using cmdstan sample() command in a Quarto document. I just do not want the samples chains, warnings etc. to appear in the document. How can I do that?
I don’t know if it is the best way to do it, but I typically add
include = FALSE to the start of the code chunk. Then, if I still want the
sample() command to appear in the document (without all the other messages and warnings), I add a duplicate code chunk with
eval = FALSE.
If you’re using
cmdstanpy (not clear from your original post) you can clear out these logging messages by
import cmdstanpy, logging cmdstanpy.utils.get_logger().setLevel(logging.ERROR)
You can set
#| output = false for that chunk.
See the Quarto documentation here: Quarto - Execution Options