This above portion between the “—” is metadata. The text other than metadata and r chuks is R markdown.
This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Shortcuts: 1) Shift + 8 - italicize selected text 2) Do the above twice to make text bold
Try executing the chuck by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Enter
plot(rnorm(50))
Add a new chunk by : 1) Code > Insert Chunk 2) Ctrl + Alt + I
plot(rnorm(500))
When you save the notebook, an HTML file containing the code and output will be saved alongside it. The name will have a “.nb.html.” suffix. .nb >> notebook. To preview the report 1) click ‘Preview’ 2) Ctrl + Shift + K
The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.
In this preview, there is a Code dropdown menu. If you click on Download Rmd in this menu, you’ll get a reproducible file.
The file saved is not a proper HTML yet. To do that go to Preview > Knit to HTML But this file will not contain the code.
Instead of doing all the knitting, you can Run >> Run All. That will update the notebook file.
Notebook HTML file and HTML files are different. HTML doesn’t have code.
But parameters can be added that can add code to the HTML file.
This is the list
Empty lines above & below the list. 2 spaces after * in bullet points. << This was emphasized as important in the tutorial.
Test Image 01
Insert image