QMD Documentation Quick Reference Library
Creating .qmd Documentation
This is intended to serve as a basic reference for .qmd documents
Most start with a YAML (that is the title at the top of this page in between two sets of three dahes).
Code Chunks - FYI
When creating .qmd documents you can use the following to create code chunks. Eval (evaluation) means you want the code chunk to actually run and display its results in the final document, while include means that you want to display the code chunk (false would mean to hide it) in the final document.
```{r eval=TRUE, include=TRUE} code goes between this and the three end quotes, but each on it's own line.```
```{SQL eval=TRUE, include=TRUE} code ``` ```{python eval=TRUE, include=TRUE} code ```
Links
This is an example of a link format [Link text](https://example.com)
Sample Section Header
This is text, usually with a space between this and the header
SampleSubHeader
This is text, usually with a space between this and the header
- List
- List
- SubList indented
- SubList indented
SampleSubSubHeader
This is text, usually with a space between this and the header
SampleSubSubSubHeader
This is text, usually with a space between this and the header
This is a code chuck
# THIS IS THE COMMENT
# if you haven't already, open a Terminal and
# pip install datetime
import datetime
# THIS IS ALSO A COMMENT
= datetime.datetime.now().month
the_month = datetime.datetime.now().day
the_day = datetime.datetime.now().year
the_year
# Get the current and next year
= datetime.datetime.now().year
current_year = current_year + 1
next_year
print(the_month)
print(the_day)
print(the_year)
print(current_year)
print(next_year)
print(datetime.datetime.now())
print(the_month,the_day,the_year)
print(f"{the_month}/{the_day}/{the_year}")
8
15
2024
2024
2025
2024-08-15 13:24:46.933700
8 15 2024
8/15/2024