0

I have recently discovered the leaflet package and Flexdashboard and have no troubles using them separately. However when I try to integrate a leaflet map into my Flexdashboard, nothing happens when I try to run my .Rmd The viewer is stuck with the "Please wait..." screen...

I have tried to simplify everything, leaving nothing more than a few packages and a renderLeaflet line but it still won't load.

When using leaflet with shiny but without Flexdashboard I have no loading problem. Neither when using Flexdashboard with other functions.

---
title: "Untitled"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
  runtime: shiny 
---
{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
library(leaflet)
library(shiny)
Column {data-width=500}
-----------------------------------------------------------------------
{r}
renderLeaflet({leaflet() %>%
                addTiles() %>%
                setView(lng = 2.342013, lat = 48.862871, zoom = 12)
              })

I don't get anything after waiting for a while, not even an error message. Did I miss something? Is there an update that I should be looking for?

Thank you for your help

1
  • I can't seem to reproduce this, your code is rendering both flexdashboard and leaflet in my R instance (After a couple of seconds). (R Version 3.6.0 Beta). Maybe try updating all of your packages and running in a fresh R instance?
    – Snel23
    Commented Oct 13, 2019 at 21:12

1 Answer 1

0

Ok, in the end I just updated all my packages with

update.packages()

and everything works fine now !

Not the answer you're looking for? Browse other questions tagged or ask your own question.