Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .qmd in knitr::spin() #2284

Closed
cderv opened this issue Aug 30, 2023 · 3 comments
Closed

Support .qmd in knitr::spin() #2284

cderv opened this issue Aug 30, 2023 · 3 comments
Assignees
Labels
feature Feature requests

Comments

@cderv
Copy link
Collaborator

cderv commented Aug 30, 2023

From discussion at

Currently format = "qmd" is not possible.

I think we could do format = "qmd" in spin(), to do like .Rmd but putting chunk options in YAML probably. With knit = FALSE / report = FALSE, it would produce a valid .qmd document.

We could also offer to run quarto::quarto_render() if report = TRUE - this is related to

where we shared the idea of running rmarkdown::render() on .Rmd using R Markdown V2 and not expecting knit2html()

Storing the idea here. Any thoughts @yihui ?

We could also argue that quarto convert myscript.R could be used (or another comment) to build from a .R to a .qmd

@cderv cderv added the feature Feature requests label Aug 30, 2023
@yihui yihui self-assigned this Aug 30, 2023
@yihui yihui moved this to Todo In Progress in R Markdown Team Projects Aug 30, 2023
@yihui yihui closed this as completed in 9f3ffca Aug 30, 2023
@github-project-automation github-project-automation bot moved this from Todo In Progress to Done in R Markdown Team Projects Aug 30, 2023
@yihui
Copy link
Owner

yihui commented Aug 30, 2023

Done (since it's quite simple).

spin(text = c('#| echo: false','1+1'), format = 'qmd', knit = F)

I'm not sure if the quarto cli should support quarto render script.R directly, or only let the R package quarto support it. I'll leave this decision to the quarto team.

@cderv
Copy link
Collaborator Author

cderv commented Aug 30, 2023

Thanks @yihui !

if the quarto cli should support quarto render script.R directly,

I have opened quarto-dev/quarto-cli#6660 for follow the discussion on this idea

Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

2 participants