Skip to main content

All Questions

Tagged with
0 votes
0 answers
14 views

R Markdown doesn't plot leaflet map in Word document

I'm working on a Word document with a leaflet maps. In RStudio the leaflet maps works good, but when I Knit my Word document with Rmarkdown, no map appears in Word. I recently change my computer and ...
Camilo Montes's user avatar
0 votes
0 answers
55 views

Why are my leaflet points stuck to the map edge?

I try to plot transit stops on a leaflet map, indicating local clustering ("LISA"), based on Moran's I. The map is embedded in an R markdown file. I've successfully done that with polygon ...
fluegelrad's user avatar
0 votes
0 answers
57 views

Leaflet (addLegend) don't show color scale with comma as decimal mark

I need to print a PDF report with Rmarkdown, which presents decimals with comma separator (e.g. 2,5; 0,0123; etc,). Using options(OutDec = ","), I get all my decimal numeric output to be ...
Camilo Montes's user avatar
0 votes
0 answers
47 views

pkgdown::build_article() fails with large chunk sizes using sf and leaflet, no errors reported when setting quiet=FALSE

pkgdown::build_articles() fails with large chunk sizes rmarkdown::render() works fine article fails to render any code or text beyond the failed chunk no errors are reported with build_article(quiet=...
marine-ecologist's user avatar
0 votes
0 answers
35 views

Rmarkdown with leaflet/tmaps fails in pkgdown::build_articles() but renders with rmarkdown::render()

Example rmarkdown file here and datafile here. Code is quite simple: linestring <- readRDS(gzcon(url("https://github.com/marine-ecologist/testpkg/raw/main/data/particletracks189.rds"))) &...
marine-ecologist's user avatar
0 votes
0 answers
72 views

R markdown not knitting to HTML?

I cannot get both the markdown document to knit to html and the shiny code to function simulaneously. Here is my code: --- title: "Report" author: "Name" date: "`r Sys.Date()`&...
AlexaQuinoa's user avatar
2 votes
0 answers
152 views

Trying to get leaflet plots to show on PDR render of RMarkdown

I would like to render a rmarkdown as pdf that as some html (leaflet) in it. Here is the YAML header: date: '2022-07-29' output: pdf_document always_allow_html: true My markdown would not render as ...
Jessica Amey's user avatar
0 votes
0 answers
88 views

How to change color of leaflet map around the polygon shape in r? [duplicate]

I am using a shape file in leaflet plot & would like to have white color space external to the outer boundary of polygon shape instead of default greyish color background like color but unable to ...
ViSa's user avatar
  • 1,717
0 votes
1 answer
625 views

How can I control the zoom speed when selecting a point on a leaflet map (with Shiny) when the user presses the button to zoom in to the point?

I am developing a dashboard in Rmarkdown, Flexdashboard and Shiny. At the moment I am using Leaflet to map several points and I have a shiny input, which when pressing a button selects a certain point ...
Wolkuz's user avatar
  • 83
1 vote
2 answers
852 views

Auto sizing Leaflet Widget in Rmd HTML Document

I am trying to host a leaflet map on Rpubs.com, but am facing problems trying to size the map size in the knitted Rmd file before publishing. Ideally, I would like for the map to resize based on the ...
timlxq's user avatar
  • 41
4 votes
1 answer
916 views

How to insert saved Leaflet widget into Rmarkdown HTML output

I create a Leaflet widget and save it locally: library(htmlwidgets) library(leaflet) library(sf) shp = st_read("/path/to/some/shapefile.shp") m = shp %>% leaflet() %>% addProviderTiles(...
ardaar's user avatar
  • 1,224
2 votes
0 answers
238 views

RMarkdown cyrillic encoding of leaflet popup

On my windows machine I got this encoding problems. I'm making an interactive map using leaflet and rmarkdown. The point is, that map title and popup should be in Russian. When I'm just creating a ...
atsyplenkov's user avatar
  • 1,259
2 votes
0 answers
3k views

Add static view of Leaflet in Rmarkdown pdf output

I have an RMarkdown that I'd like to knit to HTML and PDF. The notebook contains a LeafLet map that I can see fine in the HTML preview but it's completely ignored in the PDF output. By this I mean, ...
Daniel's user avatar
  • 556
3 votes
1 answer
658 views

Combine leaflet and markdown in loop

This question shows how to loop over/apply leaflet objects within a markdown file. I'd like to do a similar thing, though I'd like to add additional markdown content. --- title: "Test" output: ...
gregmacfarlane's user avatar