Using the Knit
tab, knit your R Markdown document into a HTML file.
The default settings for the HTML output are rather dull…that’s why we sometimes change one thing or another to make the document more readable or other suitable for our needs. Using the number_sections
argument, reformat the output code of your report document from exercise 8 to number the sections in the document.
SOLUTION
To do this, we would need to make sure we have defined the output style: html_document:
and then tabbed in, number_sections: true
Using the toc
argument, reformat the output to include a table of contents.
SOLUTION
To do this, we would need to make sure we have defined the output style: html_document:
and then tabbed in, toc: yes
Take at look at the two documents below and have a look at the following output arguments (these are included in the output formats in the first few lines of each document).
Documents (raw analysis scripts):
What do you think the following output arguments do? How do they change the HTML output of the respective document?
Output arguments:
The next several links lead to the HTML outputs (you will have to click on the blue download button in the upper right corner to view the HTML documents).
Documents (HTML outputs):
Compare your assumptions about what the respective HTML outputs do with what you see in the documents. How do these documents differ to those you knitted in the previous exercises?