Images in RMarkdown files

Berkomunikasi dengan Data di Tidyverse

Timo Grossenbacher

Data Journalist

Berkomunikasi dengan Data di Tidyverse

Adjusting figure options in RMarkdown


```{r}

... ggplot2 code ...

```

Berkomunikasi dengan Data di Tidyverse

Adjusting figure options in RMarkdown


```{r fig.height = 6}

... ggplot2 code ...

```

Berkomunikasi dengan Data di 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.

Berkomunikasi dengan Data di 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

Berkomunikasi dengan Data di Tidyverse

Let's practice!

Berkomunikasi dengan Data di Tidyverse

Preparing Video For Download...