include_url not showing html in url when knitted

Hello everyone!

I'm trying to knit an R Markdown document into an HTML file. The file includes a plotly graph. When the plotly graph was generated from the R Markdown document it shows correctly.

Unfortunately, given the internal workflow of the team we decided to create the file in Python with plotly, upload it to our blob storage in Azure and from there generate an iframe in our report. We thought it was going to be a piece of cake, because we had already created some iframe plots that way in our webpage, but maybe we underestimated it.

I've read all of this posts: link1, link2, link3 ,link 4, but they don't seem to work with my link. They work fine in embedding our webpage for example.

This is the link I'm trying to embed in the RMarkdown: Link trying to embed into Rmarkdown

Can anyone please helping me figure out what configuration I need to define in my Rmd file for it to render the plotly graph correctly?

Thank you very much. Your help is greatly appreciated.

Hi,

What did you try exactly in your Rmd file ?

What is described in the topic you linked is the cause (Insert raw html iframe into RMarkdown - #7 by cderv)

You need to install the last dev version of knitr (which will 1.34 on CRAN very soon) to use knitr::include_url() so that it will add the correct attributes for you.

Using last dev version of knitr install from Github, this works for me.

---
title: Embeded URL
output: html_document
---

```{r}
knitr::include_url("https://cognitivewebpagestorage.blob.core.windows.net/wordpress-container/IPCVizFinal.html")
```

Next version will be on CRAN soon.

1 Like

Thank you very much! installing the dev version solved the issue.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.