I am trying to publish a .Rmd
in Rpubs by embedding a YouTube video link. After some exploration, I am trying the following which just gives a blank space in my html.
<div align="center">
<iframe width="560" height="315" src="http://www.youtube.com/embed/zsYjsgm4Psg" frameborder="0" allowfullscreen>
</iframe>
</div>
Two related posts:
embed_video() provides a standard way to embed video in R Markdown documents when the output format is HTML, and to print placeholder text when the output format is not HTML.
You can insert an R code chunk either using the RStudio toolbar (the Insert button) or the keyboard shortcut Ctrl + Alt + I ( Cmd + Option + I on macOS).
R Markdown documents are a perfect platform for interactive content. To make your documents interactive, add: Interactive JavaScript visualizations based on htmlwidgets, or. Reactive components made with Shiny.
R Markdown (package)This function 'renders the input file to the specified output format using pandoc. If the input requires knitting then knitr::knit is called prior to pandoc. The RMarkdown package's aim is simply to provide reasonably good defaults and an R-friendly interface to customize Pandoc options..
<iframe width="560" height="315" src="http://www.youtube.com/embed/9bZkp7q19f0?rel=0" frameborder="0" allowfullscreen></iframe>
This can optionally be put inside a code chunk within your .Rmd
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With