Skip to content
Discussion options

You must be logged in to vote

Is it possible to use an R instruction as a parameter in a quarto document?

No you can't do that anymore. You need to initialize the values using YAML syntax. It was possible in R Markdown because all happened in R, including the YAML parsing of options, whereas in Quarto R is used only for computation with knitr, and everything else does not use tools like R. This includes parsing parameters to pass them the engine, or allow auto completion, and YAML validation.

If you really need to use R syntax, you can use the quarto R package to pass parameters, but this will be converted by the package to YAML equivalent.

You can know what to write in YAML using yaml package

> cat(yaml::as.yaml(li…

Replies: 4 comments 2 replies

This comment has been hidden.

@ddotta

This comment has been hidden.

Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

cderv Oct 7, 2024
Maintainer

Answer selected by ddotta
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants