Skip to main content

All Questions

Tagged with
8 votes
2 answers
2k views

Q: Create leaflet map in for loop in rmarkdown html

I am trying to create a leaflet map with a for-loop in an rmarkdown file. Here is a minimal example: --- title: "Test" output: html_document --- ```{r quakes, echo=F} data(quakes) library(leaflet) ...
Afoy's user avatar
  • 137
8 votes
1 answer
873 views

Incorporate Leaflet map in revealjs presentation within R

I'm trying to add a Leaflet map with tiles to a revealjs_presentation created in R. This map renders fine in ioslide or html format, but not in the revealjs_presentation format (main problems: all ...
Derek Darves's user avatar
7 votes
1 answer
2k views

Center leaflet in a rmarkdown document

I want to create an html document with a centered leaflet widget inside it. --- title: "Exemple" author: "Antoine Bichat" date: "31/08/2018" output: html_document --- ```{r leaflet, fig.align="...
abichat's user avatar
  • 2,406
7 votes
2 answers
6k views

How to arrange HTML Widgets inside of a RMarkdown Document (PDF, HTML)

I'm working in a R notebook and would like use it to create two ouptuts: an HTML document and PDF document. My analysis includes leaflet maps (html widgets), which is causing problems when I knit the ...
Tiernan's user avatar
  • 848
6 votes
1 answer
2k views

render leaflet plots as raster in R?

I realize that this largely defeats the purpose of using an interactive leaflet map, but I'm writing a traditional paper book and I want to show how the leaflet package for R works. I'm writing the ...
beanumber's user avatar
  • 777
6 votes
1 answer
2k views

How to render leaflet-maps in loops in RMDs with knitr

I am currently fighting trying to get knitr to render my leaflet maps, taken from a collection to appear correctly in a rendered RMD html-output. I'm already aware about some potential problems when ...
phabi's user avatar
  • 372
6 votes
1 answer
8k views

how to include Leaflet (for R)-output into RMarkdown presentation?

According to the documentation, Leaflet output created with the "leaflet" package for R can be included into RMarkdown. This works when the RMarkdown output is html: --- title: "Rmarkdown HTML ...
Uden VH's user avatar
  • 177
5 votes
2 answers
3k views

Leaflet not rendering in dynamically generated R markdown html knitr

I've created a R markdown report where the sections and tabsets are dynamically created. I have an issue where the Leaflet maps are not being generated in the output, but rather a blank white space. ...
Jonathan West's user avatar
5 votes
3 answers
1k views

How to automate nested sections in Rmds which include text, maps and tables

I found several examples (How to extract the content of SQL-Files using R, Use loop to generate section of text in rmarkdown, Automating the generation of preformated text in Rmarkdown using R), but ...
Christoph's user avatar
  • 7,013
4 votes
2 answers
2k views

Sync two leaftlet maps on different tabs in RMarkdown with Shiny

Running into issues syncing two leaflet maps on different tabs. After looking at previous entries (Synchronizing two leaflet maps in R / Rmarkdown), the solution provided by @TimSalabim does not ...
jpf5046's user avatar
  • 797
4 votes
1 answer
573 views

Leaflet causing an error in with R Markdown

When I try to use R Markdown (in R Studio) along with Leaflet I get an error and it fails. Here is a simple R Markdown script along with the error I am getting. I have tried everything I can think of ...
David Wilkes's user avatar
4 votes
0 answers
494 views

Can R's htmltools::includeHTML not handle leaflet maps?

I try to use the concept from here in an automated way, but maps are not displayed. The included html looks ok: Minimal reproducible example: For the generation of the html see below or. --- title: "...
Christoph's user avatar
  • 7,013
3 votes
2 answers
2k views

Synchronizing two leaflet maps in R / Rmarkdown

JS leaflet allows two maps to be synchronized. See an example of synchronized leaflet maps here. I would like to implement synchronized leaflet maps in R and more specifially in Rmarkdown/knitr. ...
chamaoskurumi's user avatar
3 votes
1 answer
832 views

shiny app with downloadable md report, error: "pandoc: Could not find data file" when run by shiny-server

I created a shiny app that provides a download button. When pressed, a markdown report is created in html-format. Here is the app: server <- function(input, output) { output$report <- ...
Christoph Scholz's user avatar
3 votes
0 answers
265 views

R Leaflet map not being created inside for loop in flexdashboard

Leaflet maps can be manually duplicated within the same section, but they do not appear when being called from inside a for loop (or a while loop). Below is an minimal example. Using htmltools::...
Youppi3's user avatar
  • 66

15 30 50 per page