set width of embedded url
Asked Answered
O

1

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?

Osmosis answered 21/9, 2018 at 19:31 Comment(0)
R
7

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

Rusel answered 22/9, 2018 at 2:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.