似乎sync()
中的mapview
函数在flexdashboard中不能很好地发挥作用。在普通的.Rmd文件中呈现的效果很好,而在Flexdashboard中却没有。这是一个简单的可重现示例:
---
title: "Test"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A (works fine)
```{r}
library(mapview)
m1 <- mapview(breweries, zcol = "village", map.types = "Esri.WorldImagery")
m1
```
Column {data-width=350}
-----------------------------------------------------------------------
### Chart B (works fine)
```{r}
m2 <- mapview(breweries, zcol = "brewery", col.regions = heat.colors)
m2
```
### Chart C (does not render!)
```{r}
sync(m1,m2)
```
有什么想法吗?