quarto

quarto documents allow you to mix code and markdown text to generate hassle-free and reproducible reports / presentations / websites. It’s a full publishing ecosystem, see quarto.org. :)

In Rstudio, click File -> New File -> Quarto Document.
Click “Create” for a template, or “Create Empty Document” on the left for just the file.

In VScode under extensions, search for quarto and install quarto-vscode.
Create a qmd file and for a template, copy content e.g. from the quarto guide.