Workflow for developing Quarto documents with R and OJS

Heya! After reading more about Observable JS and its integration with Quarto, I wanted to try it out. I have very little JavaScript experience, so I naively tried to add ojs code chunks to a qmd file in RStudio and then execute the chunks interactively like I would with an R code chunk. This doesn't work and so now I'm wondering what the best way is to develop a Quarto document that mixes R and Observable so that I can interactively run both types of code chunks when I'm developing.

From this response, it seems like it is not possible in RStudio or VSCode currently -- so what are the alternatives?

I think you found the limitation. Interactively, it is not yet available in IDE or VSCODE. It will be in the future, but no date on that yet. You need to render, or at preview the document .

For example freezing should work and allow you to quickly iterate on your development, not like a notebook but like a source code + preview window: Quarto - Managing Execution

Otherwise, developping on observablehq notebook would be the place to do interactive work like that:

Quarto does not aim to replace this, but aim more at offering a way to include OJS chunks in a project seemlessly.

Hope it helps

1 Like

Thanks for the response! Freeze + render on save seems like a decent option until there is support in RStudio IDE or VSCode for interactive running ojs chunks.

I also will try the option of using an observablehq notebook for development and then brining the code back into the qmd when I'm at a good point.

1 Like