r - 在 Rstudio 之外的 rmarkdown 笔记本(html 笔记本)中使用 plotly
问题描述
是否可以使用html_notebook
akar notebook
格式plotly
?
当我使用下面显示的 rmarkdown 文件(名为temp.Rmd
)时,我可以knit to HTML
并且一切正常——也就是说,我可以查看正确的temp.html
文件。但是,当我使用打开预览窗格的Preview Notebook
按钮或查看文件时,我会丢失输出。RStudio
temp.nb.html
plotly
temp.Rmd
---
title: "R Notebook"
output:
html_notebook: default
html_document:
df_print: paged
---
Some text here.
```{r message = FALSE, warning = FALSE}
library(ggplot2)
library(plotly)
p <- ggplot(mtcars, aes(x = cyl, y = mpg)) + geom_point()
ggplotly(p, width = 500, height = 500)
mtcars
```
More text here.
会话信息
Session info ---------------------------------------------------------------
setting value
version R version 3.5.0 (2018-04-23)
system x86_64, mingw32
ui RStudio (1.2.593)
language (EN)
collate English_United States.1252
tz America/New_York
date 2018-05-01
ggplot2 * 2.2.1.9000 2018-04-27 Github (tidyverse/ggplot2@1d537ce)
plotly * 4.7.1.9000 2018-04-27 Github (ropensci/plotly@38f447f)
解决方案
推荐阅读
- apache-kafka - 融合 CLI - windows 环境
- django - 如何在静态 java 脚本中显示我的管理面板问题
- flutter - 我试图在颤动中添加一个轮播滑块,但我面临缺少所需的参数错误
- swift - 覆盖类别 VC 中的 Swipe VC 超类时,TableView 单元格返回 nil
- java - 调用 setAdapter(cursorAdapter) 方法时应用程序崩溃
- javascript - 为什么 Codecademy React 项目中未定义属性“then”?
- r - 嵌入在 rmarkdown 文档中的降价表中的列宽
- javascript - 使用私有变量继承类,以及 JavaScript 中的 getter/setter
- tensorflow - 将自定义预训练模型与新模型 Keras 连接起来
- c++ - 使用 C++ 读取 Qt GUI 应用程序中的输入和打印阶乘