6

In R, the function include_url() from the knitr package allows to set the height, but not the width of an embedded iframe.

knitr::include_url("https://www.youtube.com/embed/9bZkp7q19f0", height="315")

The above will embedd the youtube with height =315 and width=672. Is there a way to set the width myself?

Paulo
  • 397
  • 2
  • 11

1 Answers1

7

Use the chunk option out.width, e.g., out.width="100%".

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419