Popisek, který můžu takhle napsat ToothGrowth dataset, Guniea Pigs (literal) were given different amounts of vitamin C to see how it affected their tooth growth.

code chunks

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

As you can see, from running the play button of chunk, results are printed

fit <- lm(len ~ dose, data = Toothdata)
b <- fit$coefficients

plot(len ~ dose, data = Toothdata)

abline(lm(len ~ dose, data = Toothdata))
Figure 1 of Guniea Pigs Tooth Growth

Figure 1 of Guniea Pigs Tooth Growth

The slope of the regression line is 9.7635714

Section Headers

Druhý level

Třetí level

point-type marks

  • one item
  • one item
  • one item
    • one more item
    • one more item

number-type marks

  1. one item
  2. one item
  3. one item
    1. one more item
    2. one more item

Block Quotes

We can put really nice quotes

“Genes are like the story, and DNA is the language that the story is written in.”

— Sam Kean

Formulas

We can also put nice formatted formulas

Hard-Weinberg Formula

\[p^2 + 2pq + q^2 = 1\] you can get really complex as well

\[\Theta = \begin{pmatrix}\alpha & \beta \\ \gamma & \delta \end{pmatrix}\]

Code chunks

Code chunk options

There are options how knitr, můžu vypnout části kodu

eval (T or F) - whether to evaluate the code or not

print("This will not be evaluated")

echo (T or F) - whether to show the code or not

## [1] "This will not be shown"

cache (T or F) - whether to cache the results or not, good for code with long run times

fig.width or fig.height - width or height of the plot (graphical device)

out.width or out.height - width or height of the plot in the R document

fig.cap: caption for the plot

Table of Contents

altering the YAML code (the weird code chunk at the very top of the document)

Tabs

You can also add tabs in report, for specific section “{.tabset}” after the line

Themes

chanhing the theme of the document. You can change the theme of the document by adding the following line to the YAML code cerulean journal flatly readable spacelab united cosmo lumen paper sandstone simplex yeti

color by specifying highlight

default tango pygments kate

Code Folding

you can use it to allow the reader to toggle between displaying the code and hiding the code

code_folding: hide