-
DescriptionHello I am using Quarto for developing coding assignments. It is really fantastic, but there one thing I can't do. I need to make pdf/html with code only, accomplished by ```r, but develop the quarto file with ```{r} so code executes to make sure my code is correct. At the moment, I search and replace all ```{r} for ```r, but is there some command line switch that makes that automatic? Thanks for this wonderful program. best Jack |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You can control execution using some YAML option. For example, you can deactivate all evaluation using
See https://quarto.org/docs/computations/execution-options.html Another option would be to use a Project, and the It depends what you need exactly - possibly |
Beta Was this translation helpful? Give feedback.
-
Thanks @cderv ! This actually is not what I was looking for, I want code to execute in VScode, so I can make sure it it correct. I just don't want code to execute when I render/preview the files, and only show the code. Reason is that the html/pdf files ultimately go to students and the TAs, and they are to execute the code themselves. So am really after a command line switch, not a yaml switch. This is easy to do with a small sed script on the command line for render, (not for preview) but that is very clumcy. At the moment I am using a best jd |
Beta Was this translation helpful? Give feedback.
-
@mcanouil Yes, I should have had my coffee before responding. That makes perfect sense. I am still coming to grips with Quarto, and this eventuality escaped me. And Quarto is truly fantastic. best, j |
Beta Was this translation helpful? Give feedback.
You can control execution using some YAML option. For example, you can deactivate all evaluation using
See https://quarto.org/docs/computations/execution-options.html
Another option would be to use a Project, and the
freeze
option: https://quarto.org/docs/projects/code-execution.html#freezeThis will render the document once with execution, and then prevent execution unless you explicitly render.
It depends what you need exactly - possibly
eval: false
is what you need here !