mcc*_*dar 5 html r r-markdown plotly ioslides
我用 plotly 生成交互式绘图,并将它们保存为 html 页面。我是 ioslides 和 Rmarkdown 的新手,所以我通过互联网搜索,并没有找到解决方案。我想在我的幻灯片中包含一个带有 .html 扩展名的绘图图。所以我试过:
---
title: "Advanced Physics Project"
author: "mcandar"
output:
ioslides_presentation:
widescreen: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## Introduction

Run Code Online (Sandbox Code Playgroud)
它不起作用。我想要的是一个嵌入了我的 html 图形的幻灯片,它的交互功能应该可以正常工作。是否可以?
选项 1:使用iframe:
---
title: "Advanced Physics Project"
author: "mcandar"
output:
ioslides_presentation:
widescreen: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
<iframe src="myfile.html"></iframe>
Run Code Online (Sandbox Code Playgroud)
选项 2:包含 HTML
```{r}
shiny::includeHTML("myfile.html")
```
Run Code Online (Sandbox Code Playgroud)