Embedding plotly output in R markdown

后端 未结 2 1961
轻奢々
轻奢々 2021-01-03 00:50

There is a blog entry which describes embedding from the plotly API for R into R markdown. I just used the code to create the iframe for an html document

When I ha

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-03 01:24

    I had to add a ".embed?width=550&height=550" after my url to make it work. See below

    ```{r}
    library("knitr")
    library("devtools")
    url<-"https://plot.ly/yourplothere.embed?width=550&height=550" 
    plotly_iframe <- paste("
    ", sep = "") ``` `r I(plotly_iframe)`

提交回复
热议问题