[1] 3
https://rafalab.dfci.harvard.edu/dsbook-part-1/productivity/reproducible-projects.html
File menu to create a new Quarto documentwe will be creating and editing markdown documents - mostly using the Quarto paradigm
for Quarto you can use either a source view or a visual view:
Note: You can state your preference in the header:
Start a new empty document.
At the top you see:
The things between the --- are the YAML header.
*italics* or _italics_ = italics
**bold** = bold
***bold italics*** = bold italics
~~strikethrough~~ = strikethrough
`code` = code
This:
```
line 1
line 2
```
shows a code chunk:
line 1
line 2
You can start sections and subsections like this:
# Header 1
## Header 2
### Header 3
Show the link: <https://quarto.org/docs/guide/>
Add link to text: [Quarto Guide](https://quarto.org/docs/guide/)
Looks like this:

Shows the plot and caption:
Introductory Statistics with R
Bullets:
- bullet 1
- sub-bullet 1
- sub-bullet 2
- bullet 2
Looks like this:
Ordered list:
1. Item 1
2. Item 2
Looks like this:
Note
Technical report often uses LaTeX for typesetting.
There are many online tutorials, like this one.
Examples:
Inline: $Y_i = \beta_0 + \beta_1 x_i + \varepsilon_i$ looks like this \(Y_i = \beta_0 + \beta_1 x_i + \varepsilon_i\)
Display math:
$$
\mathbf{Y} = \mathbf{X\beta} + \mathbf{\varepsilon}
$$
looks like this:
\[ \mathbf{Y} = \mathbf{X\beta} + \mathbf{\varepsilon} \]
One can include and execute the code chunks in .qmd document by
Note
To add an R chunks, type the shortcut key binding command-option-I on the Mac and Ctrl-Alt-I on Windows.
We can write something like this:
It looks like this:
[1] 3
Note that it was evaluated and the result is shown.
By default, the code and result will show up.
control the behavior with #|
For example, to avoid showing code in the final document, use echo: FALSE.
There are many options
to avoid executing the code use eval: FALSE.
To avoid showing warnings warning: FALSE, to avoid showing messages message: FALSE.
RStudio provided Render button to compile the document.
quarto render filename.qmd in a terminal renders single qmd file.
quarto render renders all qmd files.
You can produce html, pdf, or word documents.
You can specify the default in the YAML header using: format: html, format: pdf,format: docx, or format: gfm (GitHub flavored markdown).