Improve `convert_chunk_header()`
This knitr::convert_chunk_header("rapport/pingouins.Rmd", "rapport/pingouins.qmd") should use YAML chunk option in output
- [x] when using with
type: yamlor with.qmdextension,.in options should be replaced with-.
knitr::convert_chunk_header("rapport/pingouins.qmd", output = identity)should havefig-widthand notfig.with(closed by https://github.com/yihui/knitr/pull/2300)
What about making sure option are converted from echo = FALSE to #| echo: false ?
Currently : echo = FALSE will yield #| echo = FALSE
My humble expectation : echo = FALSE will yield #| echo : false and be fully quarto compliant
My bad knitr::convert_chunk_header("foo.Rmd", output = "foo.qmd", type = "yaml") solves my problem.
Apologies !
You indeed need to use type = "yaml" as it is not the default unless you are converting from a .qmd
knitr::convert_chunk_header("foo.qmd", output = identity)
So you can copy and rename you Rmd file and then convert.
We did that because for Rmd files the YAML syntax is not the prefered multiline syntax.
https://yihui.org/en/2022/01/knitr-news/#an-alternative-syntax-for-chunk-options