Embedding graphical output in R markdown

There is a blog entry that describes the implementation of the plot API for RR markdown. I just used the code to create an iframe for the html document

When I have a prieview in studio R, there is no error message and an iframe is created in the html document. However, it is simply empty. Apparently, it is somehow not loading the content. I didn’t create a plot in the R API before (but it doesn’t matter, since this is just an embedding of the image in html), right?

My code is in r markdown since it is currently

```{r}
library("knitr")
library("devtools")
url<-"https://plot.ly/~etpinard/251"
plotly_iframe <- paste("<iframe scrolling='no' seamless='seamless' src='", url, 
    "/800/600' width='800' height='600'></iframe>", sep = "")

```
`r I(plotly_iframe)`
+4
source share
2 answers

, RPub. - RPub.

RPubs.com, , . , " " RPubs:

RPub

. height 800 width 650, . <center>, .

Plotly URL . https://plot.ly/~etpinard/251.embed. , RPUB . borderwidth, , .

: . , , RStudio - ().

, , Plotly ggplot2. ! : Plotly.

: 21 2015 .

Plotly, R Markdown . R -. :

p <- plot_ly(economics, x = date, y = uempmed, filename="r-docs/knitr-example")

knitr/R Markdown HTML, plotly HTML iframe. R Markdown, p .

. : {r, height = 800} .

Plotly Offline R Studio, plotly knitr plotly.js : .

knitr HTML , knitr::knit markdown::markdownToHTML. :

knitr::knit('plotly-report.Rmd', 'plotly-report.md')
markdown::markdownToHTML('plotly-report.md', 'plotly-report.html')
+5

".embed? width = 550 & height = 550" url, . .

```{r}
library("knitr")
library("devtools")
url<-"https://plot.ly/yourplothere.embed?width=550&height=550" 
plotly_iframe <- paste("<center><iframe scrolling='no' seamless='seamless' style='border:none' src='", url, 
    "/800/1200' width='800' height='1200'></iframe><center>", sep = "")

```
`r I(plotly_iframe)`
+2

All Articles