Code chunk options

Reporting with R Markdown

Amy Peterson

Head of Core Curriculum at DataCamp

The data code chunk

Data code chunk

Reporting with R Markdown

The data code chunk

Data code chunk with include equals FALSE option

Reporting with R Markdown

The include option

Markdown file with include equals FALSE

Knit file with include equals FALSE

Reporting with R Markdown

The echo option

Markdown file with code to create line plot with echo equals FALSE

Knit file with code to create line plot with echo equals FALSE

Reporting with R Markdown

The eval option

Markdown file with code to create table with eval equals FALSE.png

Knit file with code to create table with eval equals FALSE.png

Reporting with R Markdown

Code option summary

Code is run Code appears in report Results appear in report
include = FALSE Yes No No
echo = FALSE Yes No Yes
eval = FALSE No Yes No
Reporting with R Markdown

The collapse option

Markdown file without collapse option specified

Knit file with default collapse option

Reporting with R Markdown

The collapse option

Markdown file with collapse equals TRUE

Knit file with collapse equals TRUE

Reporting with R Markdown

Let's practice!

Reporting with R Markdown

Preparing Video For Download...