Use the Render button to preview documents as you edit them: Use the File : New File : Quarto Document… command to create new Quarto documents: If you are using Quarto within RStudio it is strongly recommended that you use this version (the documentation below assumes you are using this build). The latest release of RStudio (v2022.07) includes support for editing and preview of Quarto documents. You can override the version of R used by Quarto by setting the QUARTO_R environment variable. In addition, on Windows when R is not found on the PATH, the registry will be scanned for the current R version. Quarto will select a version of R by looking on the system PATH. Installation of the rmarkdown package will also install the knitr package so you will have everything required to render documents containing R code. You can render Quarto documents in a variety of ways:įrom the system shell using the quarto render command: When a Quarto document is rendered, R code blocks are automatically executed. There are many options which control the behavior of code execution and output, you can read more about them in the article on Execution Options. You can produce a wide variety of output types from executable code blocks, including plots, tabular output from data frames, and plain text output (e.g. printing the results of statistical summaries). This document results in the following rendered output: These are cell level options that make the figure cross-referenceable. You’ll note that there are some special comments at the top of the code block. #| warning: false library(ggplot2) ggplot(airquality, aes(Temp, Ozone)) + geom_point() + geom_smooth( method = "loess") ``` ``` #| label: fig-airquality #| fig-cap: Temperature and ozone level. title: "ggplot2 demo" author: "Norah Jones" date: "" format: html: code-fold: true - # Air Quality further explores the impact of temperature on ozone level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |