—
title: “Embedding Example”
author: “Robin Burke”
date: “9/27/2017”
output: html_document
—
There are a number of ways to include graphics in your R markdown file — for example, a network visualization that you have created in Gephi. The simplest is the built-in embedding syntax, but this provides no control over the image size.
## Rmd syntax
The embedding syntax is not R code, so it is not inside of an R chunk.
![](les-mis-section.png)
## Include_graphics alternative
This is a knitr-specific function, so it is R code and needs an R code block. The major benefit is that it allows control of the size of the image.
“`{r, out.width = “600px”}
knitr::include_graphics(“les-mis-section.png”)
“`