The part inside — is the YAML (“Yet Another Markup Language”, then later “YAML Ain’t Markup Language”) header that is used to specify metadata (title, author etc) and also output (what kind of document, e.g. html_document, pdf_document)
Some different themes: default, cerulean, journal, darkly, flatly, spacelab, cosmo, lumen, paper, sandstone, simplex, yeti, readable
Under output, add an indentation and write toc: true If you want the table to ‘float’ (aka not disappear once you scroll down), then add toc_float: true
This part of the document is plain markdown. I can make some things italics and other things bold.
In the next section I will add a “chunk” of R code:
print("hello world!")
## [1] "hello world!"
The part inside ```{r} is R code.
You can see that by default, the “knitted” document shows my code first, which is then followed by the output that R generates when this code is “executed”.
Maths is written in LaTeX (when googling how to do something, google ‘how to write X in LaTeX’).
This \(x^2\) is inline. This equation is standalone. \[ a^2+b^2=c^2 \]
The formula for the associative strength \(V\) at time \(t+1\) is given by \[ V^{t+1} = V^t + \Delta V \] Where \(\Delta V\) is given by \[ \Delta V = \alpha \beta (\lambda - V~tot~) \]
$ is text
$10 and $20 are text
$10 $ and $20 $ are text
\(10\) uses maths mode