为什么ggplotly函数不显示在我的Rmarkdown ioslides中
我正在试着制作一张幻灯片,上面有一个交互式图形。ggplotly函数在控制台中工作,但不显示在标记块中-相应的幻灯片为空。正常的绘图显示得很好为什么ggplotly函数不显示在我的Rmarkdown ioslides中,markdown,plotly,knitr,ggplotly,ioslides,Markdown,Plotly,Knitr,Ggplotly,Ioslides,我正在试着制作一张幻灯片,上面有一个交互式图形。ggplotly函数在控制台中工作,但不显示在标记块中-相应的幻灯片为空。正常的绘图显示得很好 --- title: "TEST" author: "me" date: "19 February 2020" output: beamer_presentation: default ioslides_presentation: default --- 测试(工作) 测试2(不工作) 通过从.html文件直接打开浏览器而不是通过RStudio
---
title: "TEST"
author: "me"
date: "19 February 2020"
output:
beamer_presentation: default
ioslides_presentation: default
---
测试(工作)
测试2(不工作)
通过从.html文件直接打开浏览器而不是通过RStudio进行修复通过从.html文件直接打开浏览器而不是通过RStudio进行修复
library(plotly)
df = data.frame(a = c(1:3,1:10))
p = ggplot(df, aes(x=a))+ geom_bar()
p
library(plotly)
df = data.frame(a = c(1:3,1:10))
p = ggplot(df, aes(x=a))+ geom_bar()
ggplotly(p)