R flexdashboard 未在 IE 11 中呈现

R flexdashboard not rendered in IE 11

我使用 flexdashboard 制作了一系列仪表板,发现它们在 Chrome 中运行良好,但无法在 IE 11 中呈现。

我出于测试目的制作了一个非常简单的仪表板,但我在 IE 中得到的仍然是一个空白页面。如果我将 flexdashboard 的输出更改为 html_document,它可以正常显示,因此问题似乎出在 flexdashboard 而不是 R Markdown。

这是我的简单仪表板:

---
title: "Flexdashboard - Internet Explorer test"
output: 
  flexdashboard::flex_dashboard
---    
```{r setup, include=FALSE}
# Libraries
library(flexdashboard)
library(knitr)
library(ggplot2)
```
Iris
=========================================
Row
-------------------------------------
```{r}
ggplot(data=iris, aes(x=Petal.Length, y=Petal.Width, color=Species)) + geom_point()
```

这就是我在 IE 中得到的全部内容: flexdashboard IE fail

我没有找到关于这个确切问题的其他报告,只有 similar problem using ggiraph

我让我的同事尝试在她的计算机上使用 IE 打开文件,结果是一样的。我真的很想让这个工作,因为这个组织中的某些人只允许使用 IE。

我 运行 在为只能使用 IE 11 的客户端开发仪表板时遇到了同样的问题。诀窍是更改 IE 11 浏览器中的设置。虽然此修复需要最终用户预先执行一个手动步骤,但更改设置后,最终用户应该不会在 IE 11 中加载仪表板时遇到问题。

  1. 点击 IE 11 浏览器右上角的设置齿轮。
  2. Select 'Compatability View settings' 来自下拉列表
  3. 取消选中 'Display intranet sites in Compatibility View'
  4. 关闭设置对话框并打开仪表板