2025-05-20
we had used rmarkdown or variations for a while
it works with other languages: Python
, Julia
, …
it allows to render many things:
mostly because the notation is cleaner
Instead of adding everything inside the header ‘```{r}’ header, it looks like:
echo: "fenced"
gives the code blocks like that
modifications to the output is done within :::
, for example tabs:
::: {.panel-tabset}
## Element 1
## Element 2
:::
revealing slide points incrementally:
::: {.incremental}
point 1
point 2
:::
Using something like:
::: {.callout-important}
# Important message
The results ....
:::
yields:
Important message
The results ….
---
resources:
- "path/to/multiqc_report.html"
---
It looks as in: https://biostat.wisc.edu/~rwelch/onglab/albertini/SatTCR_report/qc.html#multiqc-report
used when a task is repeated many times, and want the same plot / analysis for many elements
it is done in 3 steps
In summary:
pdata
into the environment that is evaluated in the template```{r}
#| label: "model-example"
#| include: true
#| echo: "fenced"
#| eval: false
int_model |>
tidy_zeroinfl() |>
mutate(
component = if_else(component == "conditional", "count", "zero")) |>
filter(term != "(Intercept)") |>
select(- df.error, - original_term, -statistic) |>
mutate(
term = case_when(
term == "treatmenttreat" ~ "treatment",
term == "conditionB16_mixed" ~ "mixed dose",
TRUE ~ "interaction")) |>
gt::gt(
groupname_col = "component", rowname_col = "term") |>
gt::fmt_number(one_of(c("estimate", "std.error"))) |>
gt::fmt_number(starts_with("conf")) |>
gt::fmt_percent("conf.level") |>
gt::fmt_scientific("p.value") |>
gt::cols_add(
psgn = if_else(p.value <= 0.05, "*", "")) |>
gt::cols_label(psgn = "")
```
opt_interactive
can allow for multiple pagesTo get this cat:
Install the fontawesome quarto extension: quarto add quarto-ext/fontawesome
Write {{ < fa cat size=5x > } }
https://github.com/quarto-ext/fontawesome
other extensions: https://quarto.org/docs/extensions/
Quarto authoring webinar https://jthomasmock.github.io/quarto-2hr-webinar/
Stephen Turner’s blog https://blog.stephenturner.us/p/quarto-books
Quarto’s gallery https://quarto.org/docs/gallery/
Using python and R together https://nrennie.rbind.io/blog/combining-r-and-python-with-reticulate-and-quarto/