Toothdata <- ToothGrowth
head(Toothdata)
##    len supp dose
## 1  4.2   VC  0.5
## 2 11.5   VC  0.5
## 3  7.3   VC  0.5
## 4  5.8   VC  0.5
## 5  6.4   VC  0.5
## 6 10.0   VC  0.5
fit <- lm(len ~ dose, data = Toothdata)
b <- fit$coefficients
plot(len ~ dose, data = Toothdata)
abline(lm(len ~ dose, data = Toothdata))
Figure 1: The tooth growth of Guinea pigs

Figure 1: The tooth growth of Guinea pigs

the slope of the regression lne is 9.7635714

It is important to note that everything in the R-Markdown console is taken/interpreted as a denotations, except the codes put in between the “code chunks”.

Section Headers

We use the “hash” to insert headers in R_Markdown

First Headers

Second Headers

Third Headers

  • One item
  • Two item
  • Three item

you should know that, space and indentation is very important in R_markdown, the symbol “>” is also used in adding quotes into Markdown document.

“Genes are like the story of a organism, and DNA is the language that the story is written in”

— Sam Kean

Code Chunks

Code chunks options

There are also iptions fot our R Markdown file oon how knitr interpret the code chunk.

Eval (T OR F) : whether or not the code should be evaluated Echo (T or F) : whether of=r not he code chunk should be displayed, but the result would be printed fig.cap: To insert The caption or tittle of the images/figures fig.widht or fig.height : To resize or reshape images/figure

Table of Content

To add table of content to our HTML Document, we do that by altering the YAML code at the very beginning of the Document.

title: “HTML_Tutorial” author: “Uche Declet” date: “2025-11-04” output: html_document: toc: True toc_float: True

This will give us a very nice floating Table of Content

Tabs

We can also add “Tabs” to our report by simply adding “{.tabset}” to the Header (Headers with subsets). every subsequent header will appear as a new tab.

Themes

We can also add themes to the document that changes the highlighting color and hyperlink colors the document. to do so, we have to change the themes in the YAML to one of the following:

cerulean journal flatly readable spacelab united cosmo lumen paper sandstone simplex yeti null

##Code Folding

We can use this option to allow the reader to juggle between choosing to read the code or hide it. this is done by inserting “code_folding_hide” into the YAML code above

Summary