Images in RMarkdown files

Truyền đạt bằng Dữ liệu trong Tidyverse

Timo Grossenbacher

Data Journalist

Truyền đạt bằng Dữ liệu trong Tidyverse

Adjusting figure options in RMarkdown


```{r}

... ggplot2 code ...

```

Truyền đạt bằng Dữ liệu trong Tidyverse

Adjusting figure options in RMarkdown


```{r fig.height = 6}

... ggplot2 code ...

```

Truyền đạt bằng Dữ liệu trong Tidyverse

Figure options

Option Possible values Effect
fig.height Numeric, inches The height of the image in inches.
fig.width Numeric, inches The width of the image in inches.
fig.align One of "left", "right" or "center" The alignment of the image in the report.

More options on the respective help page of the knitr package.

Truyền đạt bằng Dữ liệu trong Tidyverse

External images in RMarkdown reports

![An impressive mountain](https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/
Matterhorn_from_Domh%C3%BCtte_-_2.jpg/1200px-Matterhorn_from_Domh%C3%BCtte_-_2.jpg)

An impressive mountain An impressive mountain

Truyền đạt bằng Dữ liệu trong Tidyverse

Let's practice!

Truyền đạt bằng Dữ liệu trong Tidyverse

Preparing Video For Download...