Quarto Features

Embed code in chunks

```{r}
# code that does something fun
```

Don’t run the code if it’s installing a package!

```{r, eval = F}
# The most evil R package ever
remotes::install_github("romainfrancois/evil.R") 
```

Include results in nice tables

library(knitr)
data(mtcars)
kable(head(mtcars))
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1

References

In your main quarto file…

@refname1 said that you should "stay on the sunny side, always on the sunny side", which has been validated in other studies [@refname2; @refname3]

In your refs.bib file…


@misc{refname1,
    title = {Keep on the sunny Side},
  year = {1899},
  author = {Blenkhorn, Ada}
}

@book{refname2,
  title = {O Brother Where Art Thou},
  author = {The Whites},
  year = 2000
}

@book{refname3,
  title = {Keep on the Sunny Side},
  author = {The Carter Family},
  year = 1964
}

You may have to check Zotero’s work – webpages often don’t have dates zotero detects.

Look for the ‘last updated’ date if all else fails.

Basic Formatting

  • # = primary section subdivision (chapter for books, etc.)
  • ## = subsections
  • ### = subsubsections

Never use more than one additional # in a sub-section!!

In book projects, # headings are reserved for chapters, which are usually in separate files. Sections (##) and Subsections (###) only occur within chapters.

Quarto projects

_quarto.yml file contains project-wide metadata

  • Title
  • Author(s)
  • Abstract
  • Bibliography

You really need to fill this in!

Callouts

Title of callout

Callouts are really cool ways to call attention to important information. There are multiple styles that each have their own colors and icons.

You can get a callout by:

::: {.callout-tip}

### Title of callout

Inside text

:::

Warning

You can even get callouts without titles by just omitting the title and title header. This is a .callout-warning

Caution

This is a .callout-caution

Note

This is a .callout-note

Formatting is Important!

If your report doesn’t have a proper title, or you haven’t bothered to fill in your name as author, it’s hard to take the rest of the report seriously!

Quarto Book documentation may help you with your business report.

Authoring documentation covers a lot of useful information – embedding pictures, videos, code annotation, tables, and more.