Analysis
Exercise - Code chunks
Open the dummy.R
- Insert a code chunk at the beginning of your document (i.e. below the YAML header) and insert the relevant code from the script to load the necessary packages.
- Insert a code chunk in the
Results
section of your document and copy a piece/section of the dummy script into it. - Run the code chunk and see if it works alright.
- Repeat the previous three steps until the whole dummy script has been incorporated within code chunks in your manuscript.
- Render the document and check the output.
- Play around with the code chunk options and re-render the document.
Exercise - Inline code
Take a couple of minutes to play around with the possibilities of inline code:
- Do a simple calculation such as
25 + 25
within your text. - Report the number of “Gentoo” and/or “Chinstrap” species of penguins within the data (hint: refer to the example in the slides).
- Try out one other (simple) in-line computation or calculation!