Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set width of embedded url

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?

like image 858
Paulo Avatar asked Sep 21 '18 19:09

Paulo


People also ask

How do I increase the width of an iframe?

Edit the width attribute. You should see the attribute "width=" after the URL in the iframe tag. Edit the width in pixels in quotations (" ") after the "width=" attribute. For example, if you want the width to be 300 pixels, you would enter "width="300px"" after the URL in the tag.


1 Answers

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

like image 176
Yihui Xie Avatar answered Sep 20 '22 03:09

Yihui Xie