2

当我使用plotly中的交互式图表或数据表中的表时我使用rmarkdown到 html,我可以在 Web 浏览器中获取交互式图表。 rmarkdown:::render

当我尝试将此 html 文件作为电子邮件发送时,交互式图表完全不会显示。

我希望能够发送静态(我的意思是非交互式 html),以便可以在电子邮件中呈现文件。

可能吗 ?

例子:

---                                                                                                     
title: "Sample Document"                                                                                
output:                                                                                                 
  html_document:                                                                                        
    toc: true                                                                                           
    theme: united                                                                                       
---                                                                                                     

```{r Code Chunk}                                                                                       
d <- diamonds[sample(1:nrow(diamonds), size = 2000),]                                                   
plot_ly(d, x = ~carat, y = ~price, color = ~carat, size = ~carat, text = ~paste("Clarity: ", clarity))  
```                                                                                                     

```{r run code, echo=FALSE, eval=FALSE}                                                                 
library(rmarkdown)                                                                                      
library(plotly)                                                                                         
rmarkdown:::render('./dyn_2_statix_html.Rmd')
```

这将html呈现以下页面: 在此处输入图像描述

4

0 回答 0