diff --git a/quarto-formats.qmd b/quarto-formats.qmd index b5295d7..0f52878 100644 --- a/quarto-formats.qmd +++ b/quarto-formats.qmd @@ -125,32 +125,6 @@ Quarto supports a variety of presentation formats, including: You can read more about creating presentations with Quarto at [https://quarto.org/docs/presentations](https://quarto.org/docs/presentations/). -## Dashboards - -Dashboards are a useful way to communicate information visually and quickly. -A dashboard-like look can be achieved with Quarto using document layout options like sidebars, tabsets, multi-column layouts, etc. - -For example, you can produce this dashboard: - -```{r} -#| echo: false -#| fig-alt: | -#| Quarto dashboard with the title "Diamonds dashboard". The first -#| tab shows four plots of the diamonds dataset. The second tab -#| shows summary statistics for price and carat of diamonds. The third -#| tab shows an interactive data table of the first 100 diamonds. - -knitr::include_graphics("quarto/quarto-dashboard.png") -``` - -Using this code: - -```{r comment = "", echo = FALSE} -cat(readr::read_file("quarto/quarto-dashboard.qmd")) -``` - -To learn more about Quarto component layouts, visit . - ## Interactivity Any HTML document can contain interactive components. diff --git a/quarto.qmd b/quarto.qmd index eddba9b..42e6580 100644 --- a/quarto.qmd +++ b/quarto.qmd @@ -153,8 +153,9 @@ If you are at the beginning of a line (as shown in @fig-visual-editor), you can ```{r} #| label: fig-visual-editor +#| echo: false #| out-width: "75%" -#| fit-cap: | +#| fig-cap: | #| Quarto visual editor. #| fig-alt: | #| A Quarto document displaying various features of the @@ -188,7 +189,7 @@ Most importantly, while the visual editor displays your content with formatting, a. Add a footnote. b. Add a horizontal rule. c. Add a block quote. -4. In the visual editor, go to Insert \> Citation and insert a citation to the paper titled [Welcome to the Tidyverse](https://joss.theoj.org/papers/10.21105/joss.01686) using its DOI (digital object identifier), which is 10.21105/joss.01686. Render the document and observe how the reference shows up in the document. What change do you observe in the YAML of your document? +4. In the visual editor, go to Insert \> Citation and insert a citation to the paper titled [Welcome to the Tidyverse](https://joss.theoj.org/papers/10.21105/joss.01686) using its DOI (digital object identifier), which is [10.21105/joss.01686](https://doi.org/10.21105/joss.01686). Render the document and observe how the reference shows up in the document. What change do you observe in the YAML of your document? ## Source editor {#sec-source-editor} @@ -334,13 +335,13 @@ The following table summarizes which types of output each option suppresses: | Option | Run code | Show code | Output | Plots | Messages | Warnings | |------------------|:--------:|:---------:|:------:|:-----:|:--------:|:--------:| -| `eval: false` | \- | | \- | \- | \- | \- | -| `include: false` | | \- | \- | \- | \- | \- | -| `echo: false` | | \- | | | | | -| `results: hide` | | | \- | | | | -| `fig-show: hide` | | | | \- | | | -| `message: false` | | | | | \- | | -| `warning: false` | | | | | | \- | +| `eval: false` | X | | X | X | X | X | +| `include: false` | | X | X | X | X | X | +| `echo: false` | | X | | | | | +| `results: hide` | | | X | | | | +| `fig-show: hide` | | | | X | | | +| `message: false` | | | | | X | | +| `warning: false` | | | | | | X | ### Global options diff --git a/quarto/markdown.qmd b/quarto/markdown.qmd index cd4f612..3873702 100644 --- a/quarto/markdown.qmd +++ b/quarto/markdown.qmd @@ -43,5 +43,3 @@ superscript^2^ subscript~2~ |--------------|---------------| | Content Cell | Content Cell | | Content Cell | Content Cell | - -/ diff --git a/quarto/quarto-dashboard.png b/quarto/quarto-dashboard.png deleted file mode 100644 index 7965322..0000000 Binary files a/quarto/quarto-dashboard.png and /dev/null differ diff --git a/quarto/quarto-dashboard.qmd b/quarto/quarto-dashboard.qmd deleted file mode 100644 index bb3a53a..0000000 --- a/quarto/quarto-dashboard.qmd +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "💍 Diamonds dashboard" -format: html -execute: - echo: false ---- - -```{r} -#| label: setup -#| include: false - -library(tidyverse) -library(gt) -``` - -::: panel-tabset -## Plots - -```{r} -#| layout: [[30,-5, 30, -5, 30], [100]] - -ggplot(diamonds, aes(x = carat)) + geom_histogram(binwidth = 0.1) -ggplot(diamonds, aes(x = price)) + geom_histogram(binwidth = 500) -ggplot(diamonds, aes(x = cut, color = cut)) + geom_bar() - -ggplot(diamonds, aes(x = carat, y = price, color = cut)) + geom_point() -``` - -## Summaries - -```{r} -diamonds |> - select(price, carat, cut) |> - group_by(cut) |> - summarize( - across(where(is.numeric), list(mean = mean, median = median, sd = sd, IQR = IQR)) - ) |> - pivot_longer(cols = -cut) |> - pivot_wider(names_from = cut, values_from = value) |> - separate(name, into = c("var", "stat")) |> - mutate( - var = str_to_title(var), - stat = str_to_title(stat), - stat = if_else(stat == "Iqr", "IQR", stat) - ) |> - group_by(var) |> - gt() |> - fmt_currency(columns = -stat, rows = 1:4, decimals = 0) |> - fmt_number(columns = -stat, rows = 5:8,) |> - cols_align(columns = -stat, align = "center") |> - cols_label(stat = "") -``` - -## Data - -```{r} -diamonds |> - arrange(desc(carat)) |> - slice_head(n = 100) |> - select(price, carat, cut) |> - DT::datatable() -``` -::: diff --git a/quarto/screenshot-editing.key b/quarto/screenshot-editing.key index 1c607ff..d15bbf7 100755 Binary files a/quarto/screenshot-editing.key and b/quarto/screenshot-editing.key differ